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
close icon

How to select multiple children of particular parent

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.

1 Reply

NK Neelakandan Kannan Syncfusion Team December 1, 2014 07:34 AM UTC

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

Loader.
Live Chat Icon For mobile
Up arrow icon