i want to add "view" button which gives me the id of selected row,
i also want to add right click menu with few options.
can you please help me how can i add these two options.
Following JS will get the id of row:
// returns null if no row is selected OR id of row (single row)
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');
To add row wise button, follow this example:
# Custom made column to show link, must have default value as it's not db driven
$col = array();
$col["title"] = "Details";
$col["name"] = "more_options";
$col["width"] = "30";
$col["align"] = "center";
$col["search"] = false;
$col["sortable"] = false;
# no new line in this html, only space. otherwise it may break ui of grid
$buttons_html = "<input type='button' value='View' onclick=''alert('my-js');";
$col["default"] = $buttons_html;
$cols = $col;
For toolbar button, refer demos/appearence/toolbar-button.php
If using free version, these demos are provided with license build.
We are sorry that this post was not useful for you!
Let us improve this post!
Tell us how we can improve this post?