Hi Avi,
Thanks for contacting Syncfusion’s support.
We have analyzed your requirement and achieved it by using ActionComplete event of Grid control. In that event, we have prevented the editing for the particular column from the currently edited row based on the certain condition (Disable the editing, if the EmployeeID is lessthan 5). Please refer to the below code example.
|
@(Html.EJ().Grid<SyncfusionMvcApplication1.OrdersView>("FlatGrid")
. . .
.ClientSideEvents(e => { e.ActionComplete("onActionComplete"); })
)
<script>
function onActionComplete(args) {
if (args.requestType == "beginedit" && args.rowData.EmployeeID < 5) {
//If the column has string edit
$("#GridFreight").addClass("e-disable");
//If the column has numeric edit type
$("#GridFreight").ejNumericTextbox("disable");
//If the column has dropdown edit type
$("#GridFreight").ejDropDownList("disable");
}
}
</script> |
And also refer to the below api reference links.
Regards,
Saravanan A.