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
This topic is locked No permission to create posts
sp_Feed Topic RSS sp_TopicIcon
jqGrid 3.7 Beta
24/05/2010
15:39
Avatar
admin
Admin
Members
Forum Posts: 66
Member Since:
05/05/2007
sp_UserOfflineSmall Offline

We are happy to announce on this day (May, 24, 2010) the new jqGrid 3.7 Beta release. Some form you will expect a lot of new features. This actually is not happen. The reason for this is that the grid code is going to be quite complex and adding a lot of new features at once will destroy the functionality of the old one.

Our team have made a decision to add new things step by step and ensure that all existing users will not be affected.

With this release we introduce a local paging, sorting, searching and more...

We expect after a month to have a working grouping.

The demo of the new features can be found here

The demo with the beta release can be downloded from here

Also you can see what is happen with the new release on GitHub

Enjoy
jqGrid Team

26/05/2010
07:10
Avatar
egocks
Philippines
Member
Members
Forum Posts: 4
Member Since:
23/04/2010
sp_UserOfflineSmall Offline

This is great & exciting news!

However, I find it confusing that the demo "Load at once from server" says that paging, sorting and searching will all be done locally, and yet, the example PHP code still contains the following lines:

$page = $_REQUEST['page']; // get the requested page
$limit = $_REQUEST['rows']; // get how many rows we want to have into the grid
$sidx = $_REQUEST['sidx']; // get index row – i.e. user click to sort
$sord = $_REQUEST['sord']; // get the direction

So can anybody please clarify: If I use the loadonce:true option for server data, will I be able to do local paging, sorting and searching on my grid?

And as a follow-up question, is it correct that I will no longer need any server-side code to manipulate the request parameters (page, sidx, sord, etc)?

Thanks!

26/05/2010
10:56
Avatar
softcore
Kostroma, Russia
Member
Members
Forum Posts: 17
Member Since:
28/07/2008
sp_UserOfflineSmall Offline

And what about export to Excel? It was the most popular user request in your poll. Will it be realised in 3.7 final release?

26/05/2010
13:23
Avatar
JViz
New Member
Members
Forum Posts: 1
Member Since:
26/05/2010
sp_UserOfflineSmall Offline

softcore said:And what about export to Excel? It was the most popular user request in your poll. Will it be realised in 3.7 final release?


Excel is an overly complex proprietary format. Why don't you ask for something a bit more resonable and practical, like export to CSV?

26/05/2010
13:48
Avatar
softcore
Kostroma, Russia
Member
Members
Forum Posts: 17
Member Since:
28/07/2008
sp_UserOfflineSmall Offline

OK. Export to CSV is also very good

26/05/2010
23:22
Avatar
squid
Member
Members
Forum Posts: 36
Member Since:
19/05/2010
sp_UserOfflineSmall Offline

No offense to the people requesting this feature, but if your goal is to export to Excel via CSV (which makes complete sense), and you have the PHP file returning what essentially amounts to tabular data, why don't you just modify your PHP script to just return the data in CSV format?  You could even make a custom navigation bar button that wraps up the functionality and not impact the jqGrid code at all?  Heck, I'm kinda bored right now anyway, so maybe I'll write it for you and post it on the forum.  Seriously, it's probably "that" easy and I've only been using jqGrid for a week or less.  It wasn't a feature I really wanted in the project I'm working on, but I guess it can't hurt.

There are a good number of things that require consideration such as what gets exported, just the page of data you're looking at (if the data is paged)?  The entire SET of data?  Which columns get exported, just the ones currently being viewed or all of the available ones?  Is the exported data supposed to be sorted in the same way it is currently presented... or does that even matter?  Should the current search criteria or filters be applied to the exported data?  What about formatting... colors... font sizes... etc.?  There are so many factors that make up "exporting."  If it's just the data, without paging (i.e. the entire data set) then it's very easy.  I'd "guess" you could even get some Excel export too written in PHP if you wanted to export "true" Excel data as well.

Again, my point here is that exporting data doesn't appear to me to provide a beneficial feature to the underlying control "especially" when such a feature can be developed by a user of the control.

Just my two cents.

27/05/2010
00:45
Avatar
squid
Member
Members
Forum Posts: 36
Member Since:
19/05/2010
sp_UserOfflineSmall Offline

Voila!  Exporting to CSV done.

First I added a separator and custom button to the navigation bar as shown:

// A separator. // .jqGrid ('navSeparatorAdd','#' + treePagerId) // // A button for exporting the grid data. // .jqGrid ('navButtonAdd', '#' + treePagerId, { id: "export_grid", caption: "", title: "Export the grid", buttonicon: "ui-icon-disk", onClickButton: function () { window.location.href = 'exportTasks.php?projectId=' + projectId; } })

Then, I created a PHP file called "exportTasks.php" and passed in a parameter called projectId (obviously this will be different for you).
Then, my exportTasks.php file looks like this:

require_once "config.php"; require_once "dbConfig.php"; require_once "HTMLUtils.php"; header ('Content-Type: text/csv'); header ("Cache-Control: no-cache"); header ("Content-Disposition: attachment; filename="sample.csv""); // // Project ID is the project we're interested in. // $projectId = (integer)$_REQUEST["projectId"]; // // Get all of the tasks for this project. // $conditions = array ("conditions" => array ("project_id = ?", array ($projectId))); $tasks = Task::all ($conditions); foreach ($tasks as $task) { echo $task->id.","; echo $task->title.","; echo $task->description.","; echo $task->user->username; echo "n"; }

I tested it in Chrome, Firefox, and Internet Exploder v8 and all three of them worked as expected.  Granted, for your situation you will likely want to customize which columns come back, and "perhaps" how they are sorted or filtered but this is simple.  It took me longer to remember how to put a SEPARATOR in the navigation bar than it did for me to write the export PHP.  Btw, I'm using ActiveRecord for fetching data.

Regards,

Squid

Btw, Tony, I "HATE" the editor for this forum :P.

27/05/2010
06:37
Avatar
squid
Member
Members
Forum Posts: 36
Member Since:
19/05/2010
sp_UserOfflineSmall Offline

I even added a tiny bit of code in the export button click to only request the columns that are currently visible.  The list of columns to return from the PHP script is sent over as a comma separated list of the indexes defined in the column model (colModel):

onClickButton: function () {

var columns = new Array (); for (var i = 0; i < this.p.colModel.length; i++) { if (this.p.colModel[i].hidden == false) { columns.push (this.p.colModel[i].index); } } window.location.href = 'exportTasks.php?projectId=' + projectId + "&projectName=" + escape (projectName) + "&columns=" + escape (columns.toString ()); }
27/05/2010
09:01
Avatar
softcore
Kostroma, Russia
Member
Members
Forum Posts: 17
Member Since:
28/07/2008
sp_UserOfflineSmall Offline

Thank you squid! I'll try to implement this functionality

27/05/2010
15:56
Avatar
squid
Member
Members
Forum Posts: 36
Member Since:
19/05/2010
sp_UserOfflineSmall Offline

Anytime man.  Not that I wouldn't "want" export capabilities, but atm, the treegrid is practically unusable for anything other than viewing.  I've been digging through the source code to try and understand the underlying data model so that I can build manipulation functions into my application but (no offence, again) there's practically no commenting in the code which makes understanding it tedious at best.  

Further, any work I do manipulating the underlying data for the treegrid is largely throw away code because once this functionality is put into the main code whatever I've done is going bye-bye.  It's mostly for this reason that I've put that effort on the back burners hoping that Tony will see fit to get the tree data manipulation into the code ASAP.  I think there's a guy named Oleg that was documenting some of the grid control's data structure, but again, I have other more pressing issues atm to deal with.

Ultimately, I'd love to see the jqGrid control be able to duplicate functionality seen in tools like this: http://www.treegrid.com/treegrid/www/

Now THAT would be a killer jqGrid demo :P.

03/06/2010
10:04
Avatar
dke01
Member
Members
Forum Posts: 7
Member Since:
12/03/2010
sp_UserOfflineSmall Offline

Any date or preview available for Groupping row based on a column as descibed here: http://www.trirand.com/blog/?p.....-breaking/

Same question for grouping headers as requested here : http://www.trirand.com/blog/?p.....8;search=1

06/06/2010
22:40
Avatar
MattyCiii
Member
Members
Forum Posts: 4
Member Since:
27/02/2010
sp_UserOfflineSmall Offline

Love the new functionality! Loads fast, local multiple searches work, Woo Hoo!!!

Can someone please confirm whether it's possible to set a search or advanced search filter on local data?  I can search/filter on one or more fields through the UI, so I know I have all the .js files loaded and configured correctly. I tried to follow the API/examples inthe wiki, ended up with the following to try to filter on two fields...

filters =

{"groupOp":"AND", "rules": [

{"field":"aor", "op":"eq","data":"D01"},

{"field":"sec", "op":"eq","data":"NY"}

] };

jQuery("#list").jqGrid('searchGrid', {multipleSearch:true, sFilter:filters } );

07/06/2010
20:37
Avatar
MattyCiii
Member
Members
Forum Posts: 4
Member Since:
27/02/2010
sp_UserOfflineSmall Offline

Bug in MSIE 7:

"Multiple Search" does not work when using IE7 as the browser.  Test it against the 3.7 Beta demo site and see.  You get multiple search options, but if you use more than 1 it fails.

I realize the correct solution is "don't use IE7", when I'm at work there's no other choice. 

I hope identifying this issue helps debug, thank you.

08/06/2010
15:40
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks. This is true. The problem appear not in the grid, but in the css and the demo configuration. We will correct this.

Best Regards

Tony

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.

11/06/2010
15:28
Avatar
Warren
Member
Members
Forum Posts: 3
Member Since:
10/06/2010
sp_UserOfflineSmall Offline

We're trying out the beta and love the new local load once features! We are however experiencing one new behavior that I don't think was intended.

When you have a horizontal scrollbar on the grid and you are scrolled to the right if you sort on a column depending on the browser you experience different things.   With Firefox it scrolls you to the very left of the grid.  If you use IE(forced to here) it seems to only scroll the grid but the table header row stays in the same spot.  Once you move the horizontal scrollbar then the header row catches up to where its suppose to be with the grid.

You can see examples of this on the demo page with firefox.  The demo sites stylesheet seems to be broken in IE so I'm currently getting horizontal scrollbars in the headers themselves (I don't see this on my testing site).  The way I was able to cause horizontal scrollbars was to stretch the columns widths out. 

Let me know if you need any more info or if this is an issue I should be able to fix myself.

Thanks,

Warren

11/06/2010
16:18
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thank you very much Warren.

Yes this is true. We have put into the demo wrong CSS.

Replacing them with the "original" one everthing seems to fix the problem.

Please let me know if this work now ok for you.

Best Regards

Tony

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.

11/06/2010
20:56
Avatar
Warren
Member
Members
Forum Posts: 3
Member Since:
10/06/2010
sp_UserOfflineSmall Offline

I'm still having the same original issue but now you can see the issue with IE on the demo site too. Here is how to reproduce.

1) Pull up any grid without a toolbar (toolbar search demo works correctly)

2) Stretch width of columns to cause a horizontal scrollbar.

3) Scroll horizontally to the right

[Image Can Not Be Found]

4) Sort on a column

[Image Can Not Be Found]

So it tries to move the grid to the very left horizontally but the header stays in the same spot. This is with IE6 and IE7.

If you try with FF it scrolls both the header and the regular rows to the very left when sorting which I don't think is the desired behavior either. Thanks! Warren

11/06/2010
21:49
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Still I can not reproduce the bug. In IE6 and IE7 works fine for me.

Are you using local demo or site demo? (the code from demo does not contain the latest fixes)

Did you have clear the cache?

Which versions of IE are used exactly?

Best Regards

Tony

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.

12/06/2010
22:03
Avatar
Warren
Member
Members
Forum Posts: 3
Member Since:
10/06/2010
sp_UserOfflineSmall Offline

Sorry I was wrong saying any grids without a toolbar.  It needs to be one with virtual scrolling enabled.  I also went to the normal demo site in the 3.6 section and there is a grid there with virtual scrolling enabled and the issue happens there to.  I also just tested with IE8 and it does the same thing as 6 and 7 like I posed in screenshot earlier.  Firefox just scrolls you back all the way to the left and chrome seems to move you as much space as the sorting icon.

Sorry for earlier confusion.

12/06/2010
23:56
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thank you.

When we know the problem, then the solution is easy Wink

Fixed.

Best Regards

Tony

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.

This topic is locked No permission to create posts
Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
61 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