AD
Administrator
Syncfusion Team
March 10, 2005 08:58 AM UTC
There are a couple of ways you can do this depending upon whether you are using a GridControl or GridDataBoundGrid.
Here is a way that should work for either case. Subscribe to either gridControl1.QueryCellInfo or gridDataBoundGrid1.Model.QueryCellInfo. In your handler, if e.RowIndex > 0 and e.ColIndex points to the column that you might want to be readonly, then get the value of the test cell using grid[e.RowIndex, testCellColIndex].CellValue. Then depending on this test value, if you want to make the cell ReadOnly, set e.Style.ReadOnly = true. Here is a KB link discussing this idea. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=95&catId=11
JI
Jitendra
March 11, 2005 04:59 AM UTC
Hi Clay,
ThanQ very much.I tried with one.
>There are a couple of ways you can do this depending upon whether you are using a GridControl or GridDataBoundGrid.
>
>Here is a way that should work for either case. Subscribe to either gridControl1.QueryCellInfo or gridDataBoundGrid1.Model.QueryCellInfo. In your handler, if e.RowIndex > 0 and e.ColIndex points to the column that you might want to be readonly, then get the value of the test cell using grid[e.RowIndex, testCellColIndex].CellValue. Then depending on this test value, if you want to make the cell ReadOnly, set e.Style.ReadOnly = true. Here is a KB link discussing this idea. http://www.syncfusion.com/support/kb/grid/Default.aspx?ToDo=view&questId=95&catId=11
>