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
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to the get the record details in WinForms GridGroupingControl?

Platform: WinForms |
Control: GridGroupingControl
Tags: records

Getting the record details

If you want to get the record id, need to use Record class. To get all the records (say previous, current and next) while add or remove or edit, you need to use SourceListRecordChanged event. This event occurs when record in the underlying data source is added or removed or changed.

If you want to restrict the event only for adding new record you can validate using Syncfusion.Grouping.RecordChangedType.


//Event Handler
this.gridGroupingControl1.SourceListRecordChanged += gridGroupingControl1_SourceListRecordChanged;
void gridGroupingControl1_SourceListRecordChanged(object sender, Syncfusion.Grouping.RecordChangedEventArgs e)
     if (e.Action == Syncfusion.Grouping.RecordChangedType.Added) //Only for new record added
        ExistingRecordId = e.Record.GetPreviousRecord().Id; //Existing record id.
        NewRecordID = e.Record.Id;//New record id
        MessageBox.Show("New record ID: " + NewRecordID + "\tExisting record ID: " + ExistingRecordId);



'Event Handler
Me.gridGroupingControl1.SourceListRecordChanged += gridGroupingControl1_SourceListRecordChanged
Private Sub gridGroupingControl1_SourceListRecordChanged(ByVal sender As Object, ByVal e As Syncfusion.Grouping.RecordChangedEventArgs)
    If e.Action = Syncfusion.Grouping.RecordChangedType.Added Then 'Only for new record added
       ExistingRecordId = e.Record.GetPreviousRecord().Id 'Existing record id.
       NewRecordID = e.Record.Id 'New record id
       MessageBox.Show("New record ID: " & NewRecordID + Constants.vbTab & "Existing record ID: " & ExistingRecordId)
    End If
End Sub



Show the record details in GridGroupingControl


C#: RecordDetails_CS

VB: RecordDetails_VB

2X faster development

The ultimate WinForms UI toolkit to boost your development speed.
You must log in to leave a comment

Please sign in to access our KB

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

Up arrow icon

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

Live Chat Icon For mobile