JqGrid学习总结_11 navButtonAdd

来源:互联网 发布:看图软件mac 编辑:程序博客网 时间:2024/05/19 19:14
1、navButtonAdd官网:
  http://www.trirand.com/jqgridwiki/doku.php?id=wiki:custom_buttons

2、navButtonAdd属性
  caption: (string) the caption of thebutton, can be a empty string.
  buttonicon: (string) is the ui icon namefrom UI theme icon set. If this option is               set to “none” only the textappear
  onClickButton: (function) action to beperformed when a button is clicked.                      Defaultnull.
  position: (“first” or “last”) the positionwhere the button will be added                (i.e., before or after thestandard buttons).
  title: (string) a tooltip for thebutton.
   cursor: string (default pointer) determines the cursor when wemouseover the                element
   id :string (optional) - if set defines the id of the button (actuallythe id of TD       element) for futuremanipulation

3、navButtonAdd实例
   jQuery("#grid_id".navGrid('#pager',{edit:false,add:false,del:false,search:false}
                   .navButtonAdd('#pager',{
                              caption:"Add", 
                              buttonicon:"ui-icon-add", 
                               id:"gridButton",
                               onClickButton:function(){ 
                                             alert("AddingRow");
                                              },
                               position:"last"})

4、控制表格上的按钮的使能
  $("#gridButton").removeClass('ui-state-disabled'); //Disable 按钮灰掉不可用
  $("#gridButton").addClass('ui-state-disabled'); //Enable 按钮可用




0 0
原创粉丝点击