<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" OnServerEditRow="EditEvents_ServerEditRow">
<ClientSideEvents ActionComplete="complete" BeginEdit="beginEdit" EndEdit="endEdit" />
<Columns>
<ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="true" TextAlign="Right" Width="75" />
<ej:Column Field="ShipCity" HeaderText="Ship City" Width="120" />
. . .
</Columns>
</ej:Grid>
<script type="text/javascript">
function beginEdit(args) {
if(args.rowData.EmployeeID > 3){ //Change as per your fieldName value
args.cancel = true;
}
}
</script>
|
Hello, good day.
Thank you for your answer your code can be adapting very well and works great; but and now i have a one more question.
How change a default value that show, than the result only shows the first data in the cell that can be edited for the grid without respecting the record to be edited.
i'll attach the code and img the show them my cuestion.Thank you for your supporting
Attachment: LockRow2_652f1d52.7z
<ej:Grid ID="OrdersGrid" runat="server" AllowPaging="True" SelectedRowIndex="0" EnableHeaderHover="True">
<ClientSideEvents DataBound="bound" />
<Columns>
<ej:Column Field="OrderID" HeaderText="Order ID" IsPrimaryKey="True" AllowEditing="false" TextAlign="Right" Width="90" />
</Columns>
<script type="text/javascript">
function bound(args) {
this.selectRows(0);
}
</script> |