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. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Manual Deleteing records from nested grids

Thread ID:

Created:

Updated:

Platform:

Replies:

27738 Apr 18,2005 09:29 AM UTC Apr 18,2005 03:53 PM UTC WinForms 1
loading
Tags: Grouping
Jaco du Preez
Asked On April 18, 2005 09:29 AM UTC

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 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();
		}
	}
}

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.

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

;