Forum
01:08
27/02/2012
  I would like to see a button that would make a request to a server to generate printable reports (PDF, Excel, whatever the server decides).
   What I'd like to see when you click the button to show a dialogbox extremely similar to the search box just the the addition of a drop down box to select the report by name. When people click the get report button. It would send the same filters to the server used for search & sort, and I can generate adhoc reports based on the report name and write the file stream back to client.Â
Essentially I would like the searchbox + the ability to set the url + a dropdown for report names.
without looking I don't think this feature is too hard, copy and paste of the searchbox generation, add ajax properties, array for report names or a buildselect type. I imagine all of the code is already in jqgrid, just a combo of certain features.
Thanks!
14:30
Moderators
30/10/2007
Hello,
You can do this using the definition of custom buttons in the grid.
The code is quite simple and you can write it depending on your requierments.
See in the docs and in the demo navButtonAdd method.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
19:27
27/02/2012
How do you make the searchbox appear with the ability to get/post to a different url? I already have a custom button, that opens a custom modal for report generation. However the searchbox has really good ways of adding/removing filters. However the searchboxes job is to filter the grid on the same url the grid is getting its data from, in other words the searchbox URL is dependent on the grid. I need something that can read the colmodel and be independent of where the data is coming from. I already have the code to search and sort the grid when the searchbox button is pressed. I have server side handlers to parse the filter into a where clause for a sql statement. It'd be nice to reuse everything.
Ben
20:54
27/02/2012
After digging through the source a little it appears something sort of like this already exists.
There is an undocumented property in filtertoolbar (line 174 of grid.custom.js, v4.5.4) called searchurl.
filterToolbar : function(p){
      p = $.extend({
         autosearch: true,
         searchOnEnter : true,
         ...
         searchurl : '',
It looks like if you set the searchurl it'll save the grid url, send in the filter, reload the grid with the filtered data and reset the url. This behavior is not in the 'searchGrid' method :(..
In fact looking between toolbar filtering and seachbox filtering there are some pretty big differences between the two. Maybe this is a good place to look for future releases to remove some redundancy...
10:39
Moderators
30/10/2007
Hello,
When the search is on to the url is added search => true - depending on this parameter you can redirect the search server side to location where you want to be.
Regards
For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.
Most Users Ever Online: 715
Currently Online:
57 Guest(s)
Currently Browsing this Page:
1 Guest(s)
Top Posters:
OlegK: 1255
markw65: 179
kobruleht: 144
phicarre: 132
YamilBracho: 124
Renso: 118
Member Stats:
Guest Posters: 447
Members: 11373
Moderators: 2
Admins: 1
Forum Stats:
Groups: 1
Forums: 8
Topics: 10592
Posts: 31289
Newest Members:
, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66