I'm doing some R&D work on displaying different colModel edittypes(Text box and check box) in two rows of the same column in a JqGrid. Because I need to display different edit-types for a same column depending on the back-end database values. Its possible to display different edit-types for different columns. Please help me on this to carry out my R&D work.
1 Answers
You don't explained which editing mode you use. The solution of the problem can be different depend on the editing mode.
I would you recommend to change the properties of the column, for example the edittype
value, directly before the editing of the row be started.
In case of form editing you can change the properties inside of call . In the answer are shown how to show of hide some column property inside of beforeShowForm
callback. Another answer or this one are examples of the usage beforeInitData
which seems be the best for your case. Inside of beforeInitData
you can change any properties of colModel
before the form will be constructed.
Typical usage of inline editing consist from the calling of editRow inside of onSelectRow
or inside of ondblClickRow
. So one can use setColProp method for example to change column properties before there will be used. See examples here and here.