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

GridGroupingControl and Tag property to associate data

Hi,

I have a question concerning the GridGroupingControl.

When I build my DataTable and at the same time as I add my DataRows, I would like to associate specific data for each rows, as what it is possible to do with the Tag Property of the ListViewItem class.
In order to get these data and to do something with when the user select another row for example (thanks to the SelectedRecordsChanged event of the grid, I think ?)

Please advice,
Best,

1 Reply

SA Saravanan A Syncfusion Team June 15, 2007 10:31 PM UTC

Hi Vivien,

You can try adding an additional column to the table to hold the additional data for each row and make that column hidden in the grid.
Or you could have an HashTable, which takes the primary key of the corresponding row as the hashkey and the associated tagvalue as the hashValue. You can retrieve the corresponding hashvalue anytime while processing a datarow.
Is that, your requirement is to process when the user moves from one record to another record?. If so then you can use the CurrentRecordContextChange event. From this event's argument you can get the corresponding DataRowView of the binded DataTable.
Please refer to this sample.
http://websamples.syncfusion.com/samples/Grid.Windows/F62497/main.htm

Best Regards,
Saravanan

Loader.
Live Chat Icon For mobile
Up arrow icon