2

I have a jqgrid and I would add in the navgrid a personal function with a specific button. Can I do it? How?

    jQuery("#tabGrid").jqGrid({
    .....
    }).navGrid('#pagerPrivati',
{}, //options
{
}, // edit options
{
}, // add options
{
}, // del options
{
} // search options
);

Thank you so much.

michele
  • 26,348
  • 30
  • 111
  • 168

1 Answers1

1

First you can skip the last empty {} parameters of navGrid. So you can just rewrite your code above to the following

jQuery("#tabGrid").jqGrid({
.....
}).navGrid('#pagerPrivati');

To you main question. You can use navButtonAdd to add your custom button to the grid. The examples from the documentation seems me clear enough. One more example from the answer which I wrote today could be probably also helpful for you.

One uses typically the values for the buttonicon parameter in the form: buttonicon: "ui-icon-calculator" where the "ui-icon-calculator" are the name of CSS class which define an icon. Mostly one uses the jQuery UI classes which you can see for example here.

Community
  • 1
  • 1
Oleg
  • 220,925
  • 34
  • 403
  • 798