Jqgrid Custom button

Source: Internet
Author: User
Tags jqgrid

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.

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.