Jqgrid add custom button to go to new layer to go to new page

OK, I use jqgrid only to display a subset of the information.

I want to use a custom button at the navigation level to go to a new page where the user can enter a new entry.

i.e. I want a button that says (New Entry), which, when clicked, loads a new page that contains my input form and code.

I can create bvutton fine, but I cannot find the right way to get it to call a function that loads a new page.

Any ideas?

+3
source share
2 answers

I use code like this 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"
});

I hope I understand correctly what you want.

+5

. , , ?

0

Source: https://habr.com/ru/post/1791197/


All Articles