简体   繁体   中英

I need to get the entire row data from jqGrid when i click the link in same row using jQgrid

I am new to JQgrid and am unsure how to handle this use case.

When a user clicks on a link in a specific row in jQgrid I need to get the row data with a separator.

var newKey=jQuery("input[name='key']").val();

其中'key'是列的名称

Retrieving original row data from jqGrid

OR

Retrieving selected rows from jqGrid

Or else..

What I had done earlier was simpler.. appended the required data in link in a column as queryString.. eg index.php?id=123 if it can work for u..

The answer for the above question is ,when your are clicking on the rows you will have a unique value for each rows from that we need to get the id and by using the jQgrid function.

With getRowData we can get that row column values.

The sample example is pasted below:

var reqlaborId = jQuery("#list1").jqGrid('getRowData', id);
reqlaborId = reqlaborId.ahcc_laborcan_header_id;

This works fine for me...

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM