How to delete a selected record from child table in WinForms GridGroupingControl?
Delete the record from child table
In order to delete the selected row from the WinForms GridGroupingControl, the GetTable method
can be used to get the child table and the selected record will be deleted
by Record.Delete method for the child table.
C#
private void button1_Click(object sender, EventArgs e)
{
Syncfusion.Grouping.SelectedRecordsCollection selectedRecordsCollection= null;
//Used to get the child table
Table table = this.gridGroupingControl1.GetTable("MyChildTable");
selectedRecordsCollection= table.SelectedRecords;
foreach (Syncfusion.Grouping.SelectedRecord selectedRecord in selectedRecordsCollection)
{
//Used to delete the selected records.
selectedRecord.Record.Delete();
}
}VB
Private Sub button1_Click(ByVal sender As Object, ByVal e As EventArgs) Handles button1.Click
Dim selectedRecordsCollection As Syncfusion.Grouping.SelectedRecordsCollection = Nothing
'Used to get the child table
Dim table As Table = Me.gridGroupingControl1.GetTable("MyChildTable")
selectedRecordsCollection = table.SelectedRecords
For Each selectedRecord As Syncfusion.Grouping.SelectedRecord In selectedRecordsCollection
'Used to delete the selected records.
selectedRecord.Record.Delete()
Next record
End SubBefore Deletion

After Deletion

Samples:
Conclusion
I hope you enjoyed learning about how to delete a selected record from child
table in WinForms GridGroupingControl.
You can refer to our WinForms GridGroupingControl’s feature tour page to know about its other groundbreaking feature representations. You can also explore our WinForms GridGroupingControl documentation to understand how to present and manipulate data.
For current customers, you can check out our WinForms components from the License and Downloads page. If you are new to Syncfusion, you can try our 30-day free trial to check out our WinForms GridGroupingControl and other WinForms components.
If you have any queries or require clarifications, please let us know in comments below. You can also contact us through our support forums, Direct-Trac, or feedback portal. We are always happy to assist you!