0

How to get the particular jqgrid cell value using java script?For example the jqgrid having four columns like id,name,subject1,subject2.now I click the particular row and I need to get the id.how to achieve this?I use the onSelectRow in jqgrid I get the solution but I need to get the javascript?

I use the Jqgrid onSelectRow

  onSelectRow: function(id){
                  var rowData = jQuery(this).getRowData(id); 
                  var temp= rowData['name'];
                  alert(temp);
                  }
Winnie
  • 769
  • 5
  • 23
User
  • 1,644
  • 10
  • 40
  • 64
  • 2
    [here's an example where they get selected row](http://www.trirand.com/blog/phpjqgrid/examples/selection/selectedrow_client/default.php) – ClydeFrog Sep 03 '12 at 05:30
  • http://stackoverflow.com/questions/1775524/how-to-get-a-jqgrid-cell-value – a0viedo Dec 09 '12 at 19:13

1 Answers1

0

As @ClydeFlog showed in the example, try this:

var Id = jQuery('#gridName').jqGrid('getGridParam','selrow');

See the result below in the console:

enter image description here

Page example on the 'Get Selected Rows' button click.

Community
  • 1
  • 1
CleberTXR
  • 184
  • 1
  • 9