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 column while selection from mouse

Hi,

I am using Grouping grid and need to achieve functionality as below.

1.
selection of multiple columns so that I could Unhide column hidden between selected columns.
ex;
there are five columns naming col1,col2,col3,col4,col5;Now I hide col2 from the colums list from the visiblecolumns in datadescriptor.Now I need to unhide column col2 by selecting col1 and col3 together.

2.I need to drag column to next positin as well
ex. I drag col2 to col4 position and it should work with the condition stated in point 1 above.


pls help

Regards,
Ejaz

1 Reply

JS Jeba S Syncfusion Team April 25, 2007 11:58 AM UTC

Hi Ejaz,

There is no property setting that will help you to have column based selection in GGC. You will have to handle the
TableControlCurrentCellMoved/TableControlCellClick event handlers to achieve this. Please refer the sample:
http://websamples.syncfusion.com/samples/Grid.Windows/F59722/main.htm

If you want to place the hidden column in between the selected columns, please try this code snippet:

if(e.TableControl.Selections.Count==2)
{
this.gridGroupingControl1.TableDescriptor.Columns.Add("Col2");
int presentcol2 = gridGroupingControl1.TableDescriptor.Columns.IndexOf("Col2");
this.gridGroupingControl1.TableDescriptor.Columns.Move(presentcol2,2);
}


Kindly let us know if this helps.

Best Regards,
Jeba.

Loader.
Live Chat Icon For mobile
Up arrow icon