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

Expandable selection in grid control

Hi,
I have grid control with paired column.
T1-S1 T2-S2
Series 1: T1-S1
Series 2: T1-S2
If the user selects T1 and tries to delete it, I am trying to make the selection will be expanded as necessary so that series will be selected.
It has to automatically figure out that only T1 is selected and should expand itself to T1-S1.

Similarly, if T1-S1-T2 is selected, it should expand itself or shrink itself to T1-S1 or T1-S1-T2-S2

Please help me with this

Smitha


3 Replies

MC Mercy C Syncfusion Team April 18, 2012 12:51 PM UTC

Hi Smitha,

Thanks for your interest in Syncfusion products.

From your query, I understand that you need to the selections in CoveredRanges.

Please refer to the sample in the following link
http://www.syncfusion.com/downloads/Support/DirectTrac/92693/WindowsFormsApplication141973710647.zip

In this sample, when you click on outer header cells, covered rows or covered columns will be selected. If you click inner header cell, particular column or row will be selected.

Please let me know if this helps you.

Regards,
Mercy.C



SM Smitha April 20, 2012 09:24 PM UTC

Hi Mercy,

Thank you. It would be grt if u could also paste in the menu options

this.gridcontrol1.cutpaste.paste() will worrk but I want this to work only if alll the validations on the data to be pasted are true

Smitha



JP Jeya Preetha M Syncfusion Team April 24, 2012 08:48 AM UTC

Hi Smitha,

Thank you for your interest in Syncfusion Products.

To perform paste operation and validation on the data to be pasted, please make use of "ClipboardCanPaste" and "CurrentCellValidateString" event.

this.gridControl1.ClipboardCanPaste += new Syncfusion.Windows.Forms.Grid.GridCutPasteEventHandler(gridControl1_ClipboardCanPaste);

void gridControl1_ClipboardCanPaste(object sender, Syncfusion.Windows.Forms.Grid.GridCutPasteEventArgs e)
{
//Code here.

}
this.gridControl1.CurrentCellValidateString += new Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventHandler(gridControl1_CurrentCellValidateString);

void gridControl1_CurrentCellValidateString(object sender, Syncfusion.Windows.Forms.Grid.GridCurrentCellValidateStringEventArgs e)
{
//Code here.
}

Please let me know if you have any concerns.

Regards,
Jeya Preetha M



Loader.
Live Chat Icon For mobile
Up arrow icon