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

Manual Deleteing records from nested grids

I need to manualy delete selected records from a nested grid after clicking a button. The record still displays and accessing it again causes errors. I use the 3.0.10.0 code base

1 Reply

AD Administrator Syncfusion Team April 18, 2005 10:53 AM

You need to loop through all the nested tables, deleting any selected records. Try this code:
private void button1_Click(object sender, System.EventArgs e)
{
	foreach(GridTable gt in this.gridGroupingControl1.Engine.EnumerateTables())
	{
		foreach(SelectedRecord r in gt.SelectedRecords)
		{
				Console.WriteLine("SelectedRecord");
				r.Record.Delete();
		}
	}
}

Loader.
Live Chat Icon For mobile
Up arrow icon