Reputation: 449
I'm trying to bind a table and a graph using d3 and jqGrid library. For that I have to get the search typed by the user in the searchbox (my table looks like this : http://www.guriddo.net/demo/guriddojs/)
I've found this function : grid.getGridParam("postData").filters but I don't know how to use it. I thought about the trigger event "jqGridToolbarAfterSearch" to get the data after each search but doesn't seems to work... If someone has an idea I'll be very grateful! Thanks.
Ps : if the same method exist to set data, I'm interested too.
Upvotes: 1
Views: 209
Reputation: 221997
I hope that I correctly understand your problem. I suppose that you first converts the CSV data of the demo to some more continent data format: array of items with some properties (name
, economy
, cylinders
, displacement
, power
, weight
, mph
, year
). Then you can use datatype: "local"
and data
as the input data. I suppose that the user apply the local filter and then you want to get the filtered data
If you use free jqGrid fork of jqGrid (it's the fork which I develop) then you can get lastSelectedData
parameter (var filteredData = $grid.jqGrid("getGridParam", "lastSelectedData");
) to have the array of filtered items (see the demo). After that you can use d3 with the filtered items.
Upvotes: 1