Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
927
How many rows can be shown in the control?
posted

When my grid control is full of rows, I can tell how many rows fit on the screen by looking at ultraGrid1.ActiveRowScrollRegion.VisibleRows.Count. But sometimes the rows in my grid do not fill up the space taken up by the grid control (or, the grid may be scrolled).

Is there a way to determine how many rows would be visible (that is, how many rows fit in the control) even when the grid doesn't have (or doesn't show) enough rows to fill the control?

 

Parents
No Data
Reply
  • 469350
    Verified Answer
    Offline posted

     No, there's no simple way to do this.If all of your rows are the same height, then you could try to figure out the available area of the grid and divide by the row height, but you would have to account for column headers, borders, and scrollbars so it's not easy to do. 

Children