I need to customize the "Edit" icon on jqGrid row such that on click there are three icons displaying for that particular row "Save", "Cancel", and "Undo". How can this be achieved. Please suggest.
Asked
Active
Viewed 764 times
0
-
2Please provide the relevant code so that the context of how you use jqgrid is clearer. Also mention what you have tried so far and why isn't it working. – Ovidiu Dolha Jan 03 '17 at 12:24
1 Answers
0
The solution could be simple if you use free jqGrid fork of jqGrid (which I develop since the end of 2014), which supports actionsNavOptions
parameter where one can specify custom icons. The wiki article describes the feature and the demo demonstrates the usage. Another demo, created for the answer shows more advanced features of custom action buttons.
If you can't update fo free jqGrid 4.13.6, than you can follow the instruction from my old answer, which is much more tricky.
-
Hi, I've seen the demo's and just wanted to know that so far on click of the "Edit" only "Submit" and "Cancel" icons appear. Can this functionality be changed such that on click of "Edit" along with "Submit" and "Cancel" our custom icon appears too? Because I want my custom icon to show only after "Edit" icon click. – Varun Kumar Rayzada Jan 04 '17 at 08:34
-
@VarunKumarRayzada: You can use notifications, which will be called on start and end of inline editing (oneditfunc, aftersavefunc, afterrestorefunc callbacks or jqGridInlineEditRow, jqGridInlineAfterSaveRow, jqGridInlineAfterRestoreRow events). Every custom button have `class` and `id` attributes (see `ui-inline-addUser` class and id `jAddUserButton_40`, `jAddUserButton_50`, ...). Thus you will need just call `$.show()` or `$.hide()` to show/hide the custom button when you need it. – Oleg Jan 04 '17 at 11:23