Table OverflowRows

Table OverflowRows

Forum member · Jul 7, 2006
Is there a way to find out what row in a table is the first visible row? I'm using the Table.GetOverflowRows function to split a table across multiple columns and pages, and once I split it I'd like to examine the first row of the new column / page. Here's what my experimentation has found: The documentation claims that GetOverflowRows() returns a table containing the rows that didn't fit on the page. In fact, it returns the exact same table, but with the (private) StartRow property set to the first visible row, a number higher than zero. Because of this, simply accessing myTable.Rows[0] does not let me examine the first row but instead goes back to the first row of the original table. While I can see the private StartRow field in the debugger, there is no way to know in code what the first visible row of the table is. Or is there?

Re: Table OverflowRows

Support · Jul 7, 2006
Hello, You are correct; the StartRow field is currently not exposed. Using the GetVisibleRowCount() method you can find out the number of visible rows on the given page. Then increment the index by one and you will get the value of the first row for the overflow table. Thanks, ceTe Software Support Team

Re: Table OverflowRows

Forum member · Jul 7, 2006
Thank you for your prompt reply. I'm now running into another problem -- after I create a table of a specified height, I'd like to examine the last entry in it and, if it's not an entry appropriate for putting as the last row of the table, shrink the table a bit until the bad row falls off. Here's what I'm doing: Keep a running total of how many rows are displayed. int total = runningtotal + mainTable.GetVisibleRowCount() - 1; while(IsBad(mainTable.Rows[total])) { mainTable.Height -= 1; total = runningtotal + mainTable.GetVisibleRowCount(); } newTable = mainTable.GetOverflowRows(); runningtotal += newTable.GetVisibleRowCount(); The while loop never exits, even after the Height bottoms out at -2^24. It seems that changing the Height of the table does not cause it to recalculate the number of visible rows. Is there a way to force it to do so? Aric

Re: Table OverflowRows

Support · Jul 7, 2006
Hello Aric, Make sure that you are using the very latest version of our dlls. You can log into the Customer Area to get the latest version of our product if you already have a license. Otherwise you can download the latest version of the evaluation edition from our Merger for .NET download page . There was an issue that was related to the table not recalculating correctly after the Height was changed in an older release. Get the latest and see if that solves it for you. Thanks, ceTe Software Support Team