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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Find the first visible record

Thread ID:

Created:

Updated:

Platform:

Replies:

60726 May 10,2007 04:16 PM UTC May 10,2007 10:25 PM UTC WinForms 1
loading
Tags: Grouping
Alexander Polyakov
Asked On May 10, 2007 04:16 PM UTC

Hi,

How do I find a first visible record on the screen in GGC. Grid may contain more than one table. It may also has any relations. Any number of groups collapsed and expanded. Any filters. There are may be or not table headers, column headers, etc...

Regards,
Alexander.

haneefm [Syncfusion]
Replied On May 10, 2007 10:25 PM UTC

Hi Alexander,

You can try this code.

private void button1_Click(object sender, System.EventArgs e)
{
int iFirstVisibleRow = this.gridGroupingControl1.TableControl.TopRowIndex ;
Element el = this.gridGroupingControl1.Engine.CreateEmptySection( this.gridGroupingControl1.Table.TopLevelGroup );
do
{
int iTotalElements = this.gridGroupingControl1.Table.NestedDisplayElements.Count;
if( iFirstVisibleRow < iTotalElements )
el = this.gridGroupingControl1.Table.NestedDisplayElements[ iFirstVisibleRow ];
else
break;
iFirstVisibleRow++;
}
while( el.Kind != DisplayElementKind.Record ) ;

Console.WriteLine("First Visible Record is ==>" + el.GetRecord());
}

Best regards,
Haneef

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;