I want to change the order of the navigation button icons for the add, update and delete button in a jqGrid. How can I do that?
可以将文章内容翻译成中文,广告屏蔽插件可能会导致该功能失效(如失效,请关闭广告屏蔽插件后再试):
问题:
回答1:
You can reorder the navigation buttons just by usage of the functions like jQuery.insertBefore, jQuery.before, jQuery.insertAfter or jQuery.after. It's only important to know the ids of the cells used for the standard buttons. The ids will be build from the prefixes "add_", "del_", "search_", "refresh_", "edit_" and the id of the grid. For example if you have the grid with the id="list", then the cell of Delete button has the id="del_list"
.
The demo uses the following code
$("#del_list").insertBefore("#add_list");
$("#search_list").insertBefore("#del_list");
$("#refresh_list").insertBefore("#search_list");
to reorder the navigator buttons to the following: