HI
I am trying to set up multi tables and need help.
First – How do I store the selected row to a variable?
Second – How do I display only columns I wish? In the multi-table examples, all the columns are displayed – looks bad. What command allows for that anyway?
Third – Is the option to have an external link fix?
Love this
David
Hello,
1) To get variable in JS code, you can use
// returns null if no row is selected OR id of row (single row)
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');
// return array of id's of the selected rows when multiselect options is true. Empty array if not selection
var selr = jQuery('#list1').jqGrid('getGridParam','selarrrow');
2) You need to define column using set_columns() function. Refer docs OR demos/misc/example-all.php
3) Refer demos/appearance/external-link.php for help.
Thank you for telling me the obvious.
I cannot get the first grid to "Only" show the columns I specify.
After a few days of trying this is what I have…
I renamed the first grid and col variables… What am I forgetting?
can set_columns() only be use once?
3) The demo shows undefined in the grid, that's why I asked
1) is… // returns null if no row is selected OR id of row (single row)
var selr = jQuery('#list1').jqGrid('getGridParam','selrow');
an html call?
For 1) It is JS code, and can be called on some event. e.g. onclick event of button.
For 2) Set columns can be used multiple times. Just make sure you don't reference same variables in multiple grids. OR atleast unset them before using in other grid. You can also send your code for review using pastebin.com
3) I can't find undefined in demo. Can you send screenshot:
http://www.phpgrid.org/demo/demos/appearence/external-link.php