Determining if a grid row is visible

I''m trying to determine if a particular row in a virtual grid is visible or is scrolled out of view. I tried using GridControl.GetRowHidden(index) but this must be for some other purpose. How can I check if a row is scrolled out of view using its index? I''m using 3.2.1.0. Thanks.

5 Replies

AD Administrator Syncfusion Team July 4, 2006 03:10 PM UTC

Hi Ken, To determine the row visiblity in a grid , you need to use the ViewLayout.VisibleCellsRange collection. Here is a code snippet. bool IsVisible = this.gridControl1.ViewLayout.VisibleCellsRange.IntersectsWith(GridRangeInfo.Row(2)); Console.WriteLine( Isvisible); Let me know if this helps. Best Regards, Haneef


KL Ken Law July 9, 2006 12:03 PM UTC

Heneef, That worked perfectly - Thanks. I have another question. By default the row header in my virtual grid is frozen (i.e. does not scroll). Is there an easy was to change this so the row header scrolls vertically like all the other cells? Thanks, Ken


KL Ken Law July 9, 2006 12:08 PM UTC

Haneef, Oops - I meant to ask how do you set the column header so it is not frozen and is allowed to scroll vertically along with the other cells in the grid. Thanks, Ken


AD Administrator Syncfusion Team July 10, 2006 03:52 PM UTC

Hi Ken, Please refer this form thread for more details. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=34750 Let me know if this helps. Best Regards, Haneef


KL Ken Law July 26, 2006 07:24 PM UTC

Thanks Haneef - that''s just what I needed.

Loader.
Up arrow icon