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 03:53 PM UTC

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.
Up arrow icon