Is it possible to disable editing in jqGrid for certain cells in a column that is marked as editable?
From what I’ve seen, the only options are “all cells are editable” or “no cells are editable”.
Is there a way to work around this?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
I’ll recommend you to use so named “Inline Editing” for row editing. The most advantage of this method, that it is very intuitive and the user. You can see how it works on the demo page http://trirand.com/blog/jqgrid/jqgrid.html. Choose on this demo “Row Editing” and then “Using Events” or “Input types” on the left tree part. With this method you can implement any custom verification whether the selected row should be allowed to be edited or not inside of the event handle
onSelectRoworondblClickRow. If you allow editing, then you calleditRowmethod of jqGrid. This method creates input controls for all editable columns and the user can modify the row values in a natural way. The modifications will be saved if the user press “enter” key or canceled on “esc” key.I personally prefer to implement calling of
editRowmethod inside ofondblClickRowevent handler. So the user can continue selecting of rows like usual and can use double click for the row editing. The pseudo code will look like folowing: