Jquery ("# grid_id"). navgrid ("# pager",...). navbuttonadd ("# pager", {parameters });
Jquery ("# grid_id"). jqgrid ('navgrie', "# pager",...). jqgrid ('navbuttonadd', "# pager", {parameters });
{Caption: "newbutton", buttonicon: "UI-icon-newwin", onclickbutton: NULL, position: "last", title: "", cursor: "Pointer "}
Caption: button name, which can be null or string type
Buttonicon: the icon of the button, which belongs to the string type. It must be the UI theme icon.
Onclickbutton: button event, function type. The default value is null.
Position: first or last, button position
Title: string type, button prompt information
Cursor: string type, cursor type. The default value is pointer.
ID: string type, button ID
If multiple buttons are set:
· Jquery ("# grid_id ")
·. Navgrid ('# pager', {EDIT: false, add: false, del: false, search: false })
·. Navbuttonadd ('# pager ',{
· Caption: "add ",
· Buttonicon: "UI-icon-Add ",
· Onclickbutton: function (){
· Alert ("adding row ");
·},
· Position: "last"
·})
·. Navbuttonadd ('# pager ',{
· Caption: "Del ",
· Buttonicon: "UI-icon-del ",
· Onclickbutton: function (){
· Alert ("deleting row ");
·},
· Position: "last"
·});
Button Separation
Jquery ("# grid_id "). navgrid ("# pager ",...). navbuttonadd ("# pager", {parameters }). navseparatoradd ("# pager", {separator_parameters }};
Default parameters:
{Sepclass: "UI-separator", sepcontent :''}
Sepclass: property name of UI-jqgrid
Sepcontent: the content of the separator.