开发者

jqgrid add custom button to nav layer to go to new page

开发者 https://www.devze.com 2023-02-09 22:29 出处:网络
OK, I am using jqgrid to only display a subset of information. I want to use a custom button in the nav layer to navigate to a new page where the user can enter a new record.

OK, I am using jqgrid to only display a subset of information.

I want to use a custom button in the nav layer to navigate to a new page where the user can enter a new record.

i.e. I want a button that says (New record" which, when clicked loads a new pagewhich contains my record input form and code.

I can create the bvutton fine, but I ca开发者_如何学运维n't seem to find the right way to get it to call a function which loads a new page.

Any ideas??


I use such a code to add a button to the nav layer:

Html:

<table id='mygrid'> ... </table> <!-- grid -->
<div id='mygrid-panel' class='scroll'></div> <!-- nav layer -->

JS:

$("#mygrid").navButtonAdd('#mygrid-panel', {
  caption: "New record",
  title: "Click here to add new record",
  buttonicon: "ui-icon-plusthick",
  onClickButton: function() {
     // perform something...
  },
  position: "first"
});

Hope I understand you correctly what you want.


Look at the old answer. Probably it is what you need?

0

精彩评论

暂无评论...
验证码 换一张
取 消