//Way 1
// enable the pariticular column
void gridControl1_QueryCellInfo(object sender, GridQueryCellInfoEventArgs e)
{
if (e.ColIndex == 11)
e.Style.Enabled =
false;
}
// way 2
//Restrict the editing mode in the particular column
void gridControl1_CurrentCellStartEditing(object sender, CancelEventArgs e)
{
if (this.gridControl1.CurrentCell.ColIndex.Equals(11))
{
e.Cancel =
true;
}
}
Please refer to the attached sample which illustrates the same.
Let me know if you have any further concerns.
Regards,
Ragamathullah B.
Hi Jiali,
Thanks for the update.
You can avoid that behavior by using RefreshRange(). Please
refer to the following code.
void
gridControl1_SelectionChanged(object sender, GridSelectionChangedEventArgs e)
{
this.gridControl1.RefreshRange(e.Range);
}
Please refer to the following sample link.
http://www.syncfusion.com/downloads/Support/DirectTrac/96817/JialiApp2_syncfusionGrid-897174086.zip
Let me know if you have any further concerns.
Regards,
Ragamathullah B.