Forum

November 2nd, 2014
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
New button for reports.
07/06/2014
01:08
Avatar
Grausam
Member
Members
Forum Posts: 10
Member Since:
27/02/2012
sp_UserOfflineSmall Offline

   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!

09/06/2014
14:30
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

09/06/2014
19:27
Avatar
Grausam
Member
Members
Forum Posts: 10
Member Since:
27/02/2012
sp_UserOfflineSmall Offline

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

09/06/2014
20:54
Avatar
Grausam
Member
Members
Forum Posts: 10
Member Since:
27/02/2012
sp_UserOfflineSmall Offline

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/06/2014
10:39
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

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.

Forum Timezone: Europe/Sofia

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.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information