Hi Philip,
Thank you for your interest in Syncfusion products.
To customize the selection of a GridControl based on columns, you can make use of Selections.Add() method under the SelectionChanged event to handle it.
public Form1()
{
InitializeComponent();
// other codes ...
this.gridControl1.SelectionChanged += new Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventHandler(gridControl1_SelectionChanged);
}
void gridControl1_SelectionChanged(object sender, Syncfusion.Windows.Forms.Grid.GridSelectionChangedEventArgs e)
{
if (e.Range.Top > 0 && e.Range.Left == 0) // condition for row wise selection
{
this.gridControl1.Selections.Clear();
//code to make our custom selection
this.gridControl1.Selections.Add(GridRangeInfo.Cells(e.Range.Top, 2, e.Range.Bottom, 2));
}
if (e.Range.Left == 1) // check if the selection made in first column
{
this.gridControl1.Selections.Clear(); // clear all the selections.
}
}
Please refer the following sample which illustrates the above.
http://www.syncfusion.com/uploads/redirect.aspx?&team=support&file=Grid_customSelection1644672000.zipPlease let me know if you have any other concerns.
Regards,
Christopher K.