Turning off a cell editable property
Hi,
I have a column in a grid that uses check boxes and is editable. How can I turn off the editable property for a checkbox cell, when the row values require it? E.g.
Row subgroupRow = groupRow.Add(new Object[] { false, description });
if (description.equals(“Don’t edit”)) subgroupRow[0].Editable = false;
The problem is that Editable is read-only!
Cheers and thanks,
0
-
Indeed, Cell.Editable does not have the setter because the grid does not store this information by cell - it takes a lot of memory. But there is an interface that allows you to define for each cell whether it is editable. Ex:
grid.CellEditor += delegate(object sender, GridCellEditableEventArgs e)
{
if(e.Cell.Column != null && e.Cell.Column.Id == "your id")
{
Row row = e.Cell.Row;
//Check by row...
e.Editable = true;
}
};
Best regards,0
Please sign in to leave a comment.
Comments
1 comment