Hi luokun,
Thanks for using Syncfusion products.
You can use VisibleColumns collection for set the entire column as ReadOnly in GridDataControl
[C#]
this.gridControl.VisibleColumns[colIndex].IsReadOnly = true;
[XAML]
You can listen the Grid_CurrentCellActivating event as below to avoid the ReadOnly cell get focused.
void Grid_CurrentCellActivating(object sender, GridCurrentCellActivatingEventArgs e)
{
if (e.CellRowColumnIndex.ColumnIndex == 2)
{
e.Cancel = true;
}
}
Please download the workaround sample from the below locaion and check it out.
http://www.syncfusion.com/uploads/redirect.aspx?file=GridDataControlSample_c611563c.zip&team=developmentYou can use Columns collection in GridTreeControl for set the entire column as ReadOnly.
treeGrid.Columns[2].StyleInfo.ReadOnly = true;
Let me know if you need any more details.
Thanks
Ganesan