简体   繁体   中英

jqgrid current row selected

i am using this method me return last selected row and i want current selected row.

//JavaScript

$.subscribe('cellselect', function(event, data) {   
var sel_id = jQuery("#gridtable").jqGrid('getGridParam', 'selrow');      
alert(sel_id); 
});

//JQgrid event

onCellSelectTopics="cellselect"

In the Documentation says: "selrow: string This option is readonly. It contains the id of the last selected row". here

The selrow option will retrieve the currently selected row in the grid. Are you running into trouble when using this option in your application code?

For what it's worth, if you did want to get the ID of the previously selected row then you would have to add additional code to your application.

selrow will return the currently selected row index if you are not using paging. If paging is used it will return null.

See this link for more information.

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