Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I read options from a jqgrid instance?

I need to read the editurl from one jqgrid for use in a DND operation.

Background:

I have two jqgrid objects setup and have enabled drag and drop between the grids. In the onDrop event handler, i have the incoming event handler for which i can get the id of the destition grid and the row data, but I need to submit an ajax post against the same url as the destination grid. (it has a querystring parameter i need to get to)

When you create a jqgrid object, you pass in a hash of options. How do you get them back out of that object later?

like image 664
Lucas Holt Avatar asked Feb 20 '23 00:02

Lucas Holt


1 Answers

From "Methods" in jQgrid wiki docs:

var options=  $(tableSelector).jqGrid('getGridParam');
console.log(options)

To target a specific param:

var records=$("#gridId").getGridParam("records"); 
like image 65
charlietfl Avatar answered Mar 04 '23 10:03

charlietfl