jqgrid add custom button to nav layer to go to new page
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?
精彩评论