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

Data Changed event - GridGroupingControl

In my application the datasource of gridgroupingcontrol is assigned to a DataView. I saw that when the data in data view changed, the display was updated accordingly. I need to catch this event and map the changed record to the row index where I can change the cell style. Which event should I subscribe to? If possible, please tell me how to corelate display and data. thanks, albert

1 Reply

AD Administrator Syncfusion Team October 4, 2004 07:05 PM UTC

You can subscribe to the DataView''s ListChanged event to catch changes in the DataView. In the event handler, you can get the row position of teh changed row in the DataView and then map that to the grid row.
private void DefaultView_ListChanged(object sender, ListChangedEventArgs e)
	if(e.ListChangedType == ListChangedType.ItemChanged)
		GridRecord r = this.gridGroupingControl1.Table.UnsortedRecords[e.NewIndex] as GridRecord;
		int gridRowIndex = this.gridGroupingControl1.Table.DisplayElements.IndexOf(r);

Live Chat Icon For mobile
Up arrow icon