We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. Image for the cookie policy date

Retrieving records that are visible

Hi, In our application, we are using Grouping Grid. We have one requirement to get the records that are visible to the user i.e. if the grid shows 10 records and the grid contains 25 records in it. Now the scroll bar is on the top, so the user can see only the top 10 records. We want to get the collection of 10 records which is visible to the user. Is there any way to retrieve these records? Syncfusion Version : 3.3.0.0 .Net Version : 1.1 Regards, Prathima.

2 Replies

AD Administrator Syncfusion Team June 16, 2006 01:27 PM UTC

Hi Prathima, Try this code to get the all visble records in a groupin grid. Here is a code snippet. int lastrows = this.gridGroupingControl1.TableControl.ViewLayout.LastVisibleRow; for(int i = this.gridGroupingControl1.TableControl.TopRowIndex ;i < lastrows ;i++ ) { Element el = this.gridGroupingControl1.Table.DisplayElements[i] as Element; if(el.Kind == DisplayElementKind.Record ) { Console.WriteLine(el.ParentRecord.Info); } } Let me know if this helps. Best Regards, Haneef


PV Prathima Venkobachar June 19, 2006 04:18 PM UTC

Hi Haneef, Thank you very much. The solution you provided works perfectly. Regards, Prathima

Loader.
Live Chat Icon For mobile
Up arrow icon