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
close icon

Get rowindex in recordexpanding event in GGC

Hi,
We have simple DataBound GGC parent-child relationship(two level--0 for parent,1 for child).I am wiring RecordExpanding event of GGC and trying to get e.Record.id.For first time it is corectly showing rowindex.That is for first row it is showing 2 and so on.But afterwards when i change value in dropdown and GGC is refreashed with new data, it is showing 151 for first row.Afterwards if i again change value in dropwdown and GGC Is refreashed with new data, it is showing some 441 for first row.Is there some other way to get rowindex of all the parent rows which user has expanded.I want to store the rowindex of all the parent rows which user has expanded in an arraylist and use it later in some code manipulation.

Any insights/ideas into this would be highly appreciated.
Actually it is very urgent for me.It is since two weeks we are trying on this but not able to get it to work.

With Warm Regards,
Manish Bafna

1 Reply

AD Administrator Syncfusion Team March 20, 2007 10:30 PM UTC

Hi Manish,

You can use the DisplayElements.IndexOf method to find the rowIndex of the record in a RecordExpanding event. But it depends on the display elements of the grid.

int RowIndex = gridGroupingControl1.Table.DisplayElements.IndexOf(e.Record);

Also you can get the unsorted record index by using the UnsortedRecords property of the grid table. Here is a code snippet

int RecordIndex = gridGroupingControl1.Table.UnsortedRecords.IndexOf(e.Record);

Best regards,
Haneef

Loader.
Live Chat Icon For mobile
Up arrow icon