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

Finding underlying data object in GridGroupingControl from current row

Thread ID:





43308 Apr 20,2006 09:40 AM UTC Apr 21,2006 01:42 PM UTC WinForms 3
Tags: GridControl
Administrator [Syncfusion]
Asked On April 20, 2006 09:40 AM UTC

I have a GridGroupingControl that is bound to an ArrayList. The records are formatted into two rows ie: gridColumnSetDescriptor1.ColumnSpans.AddRange(new GridColumnSpanDescriptor[] {..."R0C0:R1C0"...etc) I then attached to: this.previewGrid.TableControlCurrentCellActivated += new GridTableControlEventHandler(preview_TCCCA); t Inside the event handler I munge the RowIndex for the current cell to figure out the index into the arraylist, ie the ceiling of (RowIndex-2)/2. My question is: Is there a better way to do this? it seems like a rather convoluted and obtuse way to determine the underlying object for the currently selected record. The documentation is rather sparse in this area, I''m using

Administrator [Syncfusion]
Replied On April 20, 2006 09:57 AM UTC

I forgot to mention, the second the grid gets sorted this doesn''t work anymore since the row index no longer has any correlation to the position in the underlying ArrayList Also my equation was a little off, its: int index = (int)Math.Floor((previewGrid.TableControl.CurrentCell.RowIndex-3)/2);

Administrator [Syncfusion]
Replied On April 21, 2006 10:33 AM UTC

Hi Mathew, The underlying data object from current record can be retrieved with the help of record.GetData() method. Please refer to the attached sample for more details. Regards, Calvin.


Administrator [Syncfusion]
Replied On April 21, 2006 01:42 PM UTC

That works a lot better! Thanks


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.

Please sign in to access our forum

This page will automatically be redirected to the sign-in page in 10 seconds.

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