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
45
Count REALLY visible rows in grid
posted

Using grid.ActiveRowScrollRegion.VisibleRows.Count, I can receive the count of visible rows in grid, including column headers and grid headers.

If grid is filled much, sometimes the last visible row is cropped - as show in this example with row #7.

The grid.ActiveRowScrollRegion.VisibleRows-Counter is 8 (cause of including column header).

But row #7 is not FULL visible. Is there a simple way to determine the really visible rows?

(or other possible solution: prevent grid from displaying "half lines")

-thanx

georges

Parents
  • 2501
    posted

    Hello Georges,

    Thank you for posting your request on the Infragistics WinForms Forum.  The following code snippet demonstrates using the GetUIElement on each visible row and then comparing the UIElement.Rect with the UIElement.ClipRect to see if the row is clipped:

     

     

     

    foreach (VisibleRow visibleRow in ultraGrid1.ActiveRowScrollRegion.VisibleRows)
    {
            if (visibleRow.Row.GetUIElement().Rect.Height >
                  visibleRow.Row.GetUIElement().ClipRect.Height)
            {
                    <   add code here ......... >

            }
    }

    Please let me know if this helps you help.

    Sincerely,
    Mike D.
    Developer Support Engineer
    Infragistics, Inc.

Reply Children
No Data