I am using jqGrid to display the database table and loading the JQGrid using DataSet from ASP.NET code behind file. Columns are also generated from code behind file at the runtime. I have two columns (PrimaryKey column[which is not auto-increment field], Text Field column) and I want to provide add functionality to both the columns using add-form but edit functionality to only one column i.e Text field column using inline editing.
This is similar to the question reported here and the answer is pretty close to what I want. I found other solutions as well but most of the solutions use data in JSON format and are loaded from Javascript.
I am having a hard time figuring out the above functionality because the data is already loaded from the database and I just wish to modify the editable property. By default I have Primary field not-editable and Text field – editable.
I would really appreciate any help.
The answer which you reference is oriented on the inline editing mode. In case of usage of form editing I can recommend you to follow this. You can combine both to force inside of
beforeShowFormboth columns be editable in the Add form and making only one column editable in case of Edit form or inline editing.UPDATED: From the email which you send me I could first of all find out that you used wrong tag jqgrid for your question instead of jqgrid-asp.net. So you used commercial jqSuite product instead of free open source JavaScript jQuery plugin jqGrid. I answered you how you can solve the problem in jqGrid, but your problem was how to use the same in the .NET classes which provide jqSuite.
In the case you can find the solution in the answer. You should just fix the typing error in the code and use different properties
JQGrid1.ClientSideEvents.AfterAddDialogShownandJQGrid1.ClientSideEvents.AfterEditDialogShown.