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

Manual Deleteing records from nested grids

Thread ID:

Created:

Updated:

Platform:

Replies:

27738 Apr 18,2005 05:29 AM Apr 18,2005 11:53 AM Windows Forms 1
loading
Tags: Grouping
Jaco du Preez
Asked On April 18, 2005 05:29 AM

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

Administrator [Syncfusion]
Replied On April 18, 2005 11: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();
		}
	}
}

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

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.

;