I need to access a value from the selected row in a grid with php code on the same page but outside of the grid itself. Is this possiable?
Here is sample code …
<button onclick='get_date()'>Get Selected Date</a>
<script>
function get_date(){
var selr = jQuery('#list1').jqGrid('getGridParam','selrow'); // returns null if no row is selected (single row)
// var selr = jQuery('#list1').jqGrid('getGridParam','selarrrow'); // array of id's of the selected rows when multiselect options is true. Empty array if not selection
var rd = jQuery('#list1').jqGrid('getCell', selr, 'invdate'); // where invdate is column name
alert(rd);
}
</script>
when i use "var selr = jQuery('#list1').jqGrid('getGridParam','selarrrow');"
and select 2 rows and more the jquery shows false.How can i fetch the value of all selected checkboxes in the sellarrow array?