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.

How to select multiple children of particular parent

Thread ID:

Created:

Updated:

Platform:

Replies:

117694 Nov 29,2014 06:27 AM Dec 1,2014 02:34 AM Windows Forms 1
loading
Tags: GridGroupingControl
Paurnima
Asked On November 29, 2014 06:27 AM

Hi,
I want to select multiple children of particular parent in gridgroupingcontrol.
For multiple selection  I used
  this.gridgroupingcontrol.TableModel.Options.SelectCellsMouseButtonsMask = MouseButtons.Left;
  this.gridgroupingcontrol.TableOptions.ListBoxSelectionMode = SelectionMode.MultiExtended
  this.gridgroupingcontrol.TableOptions.AllowSelection = GridSelectionFlags.None;
at RecordExpanding event
I want to select last 2 children of particular parent and I want to delete those children.But when I select those and trying to delete, all children deleted.
Is any solution regarding this?
Regards,
Paurnima.

Neelakandan Kannan [Syncfusion]
Replied On December 1, 2014 02:34 AM

Hi Paurnima,

 

Thank you for your interest in Syncfusion products.

 

If you want to remove the child table, you can use Relations property. By using this property you can use Remove() method or RemoveAt() method. Please refer the attached sample and video file.

 

Please refer the below code:

private void buttonAdv1_Click(object sender, EventArgs e)

{

int count = this.gridGroupingControl1.TableDescriptor.Relations.Count;

for (int i = count-1; i >= 2; i--)

this.gridGroupingControl1.TableDescriptor.Relations.RemoveAt(i); //Specify your needed Child table.

}

 

Please let me know if you have any concerns.   

               

Regards,

Neelakandan


Attachment: Sample_And_Video_6b7e3c8d.zip

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.

;