最新消息:雨落星辰是一个专注网站SEO优化、网站SEO诊断、搜索引擎研究、网络营销推广、网站策划运营及站长类的自媒体原创博客

javascript - jqgrid add custom button to nav layer to go to new page - Stack Overflow

programmeradmin9浏览0评论

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 can't seem to find the right way to get it to call a function which loads a new page.

Any ideas??

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 can't seem to find the right way to get it to call a function which loads a new page.

Any ideas??

Share Improve this question asked Feb 10, 2011 at 11:54 Simon SSimon S 2276 silver badges17 bronze badges
Add a ment  | 

2 Answers 2

Reset to default 5

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)

  1. 暂无评论