Hi David,
Thanks for contacting Syncfusion support.
We have analyzed your query and we found that you want to disable the OrderID field while editing the grid. Also you have mentioned the columns are automatically created in your project. So we suggest you to set the IsPrimaryKery property (If OrderID field has unique value) as true or set allowingEditing as false (If OrderID field does not have unique value) by using client side dataBound event of the Grid. Please refer the following code snippet:
|
If you want to use IsPrimaryKey:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<ej:Grid ID="Grid1" runat="server">
<ClientSideEvents DataBound="bound" />
</ej:Grid>
<script type="text/javascript">
function bound(args) {
var col = args.model.columns[0];
col.isPrimaryKey = true;
this.columns(col, "update");
}
</script>
</asp:Content>
If you want to set allowEditing as false:
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
<script type="text/javascript">
function bound(args) {
var col = args.model.columns[0];
col.allowEditing = false;
this.columns(col, "update");
}
</script>
</asp:Content>
|
We have prepared the sample with your requirement and that sample can be downloadable from the below link,
We have already discussed about this topic in our help documentation and refer the following link to help documentation:
Please let us know if you need any further assistance on this.
Regards,
Kuralarasan M.