Hi,
You can do this by handling the Grid's ClientSideBeforeEditItem event (when FullRowMode is true) or the GridColumn's ClientSideBeginEdit event (when FullRowMode is false).
The following code demonstrates how to cancel the edit when FullRowMode is true. It does not allows you to enter edit mode if the value in the first cell of the row is a number that's less than 10.
Code: HTML/ASPX
<eo:Grid runat="server" ID="Grid1"
ClientSideBeforeEditItem="before_edit_item" .....>
....
</eo:Grid>
Code: JavaScript
function before_edit_item(gridItem, save)
{
//This handler returns false to cancel the edit
//if value in the first cell is less than 10
if (parseInt(gridItem.getCell(0).getValue()) < 10)
return false;
}
The following code demonstrates how to cancel the edit when FullRowMode is false. It does not allow you to enter edit mode if the cell to be editted contains text "---".
Code: HTML/ASPX
<eo:Grid runat="server" ID="Grid1" ....>
.....
<Columns>
<eo:TextBoxColumn ClientSideBeginEdit="column_begin_edit">
</eo:TextBoxColumn>
</Columns>
</eo:Grid>
Code: JavaScript
function column_begin_edit(cell)
{
//Return false to cancel the edit if the cell value is "---"
if (cell.getValue() == "---")
return false;
}
Hope this helps.
Thanks!