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_Related Related Topics sp_TopicIcon
Grouping with Collapsed Groups Bug
27/06/2012
15:44
Avatar
mbiasetti
Member
Members
Forum Posts: 12
Member Since:
21/07/2011
sp_UserOfflineSmall Offline

Hello, 

When trying to use multi-level grouping, there seems to be odd behavior when using

groupCollapse: true

Please see my jsFiddle for an example.

When run I expect top level to be collapsed. The icon indicates it is collapsed, but the subgroups are below. When clicked, the icon changes to "expanded", but nothing happens. A second click collapses the group.

My goal is to have all top level groups collapsed when loaded, and I don't see how to make that work as it stands.

Hope this helps. Please let me know if you need more information.

01/07/2012
14:10
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

Thanks for this. I see the problem. I think that groupCollapse should array which should correspond of the grouping levels.

Will hee how to fix this.

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

07/08/2012
22:42
Avatar
tubadc
Member
Members
Forum Posts: 4
Member Since:
07/08/2012
sp_UserOfflineSmall Offline

Same problem here... any news on that bug?

13/08/2012
16:05
Avatar
tubadc
Member
Members
Forum Posts: 4
Member Since:
07/08/2012
sp_UserOfflineSmall Offline

Any news/fix , please??

02/04/2013
22:30
Avatar
Raspberyl
Member
Members
Forum Posts: 3
Member Since:
02/04/2013
sp_UserOfflineSmall Offline

Did this ever get fixed? I'm having the same problem right now

03/04/2013
15:30
Avatar
mbiasetti
Member
Members
Forum Posts: 12
Member Since:
21/07/2011
sp_UserOfflineSmall Offline

Hey folks - I tweaked v4.4.3 to accomodate some different grouping configurations. 

I attempted to fork jqGrid on GitHub, but I don't use Git and don't have the time to dig in and do this right. In the meantime, I uploaded the full jquery.jqGrid.src.js file and a short html example of the changes I made. You may find this useful. A few diffs could help you find the changes I made and implement them on  new version if necessary.

Take a look: https://github.com/mbiasetti/jqGrid

Hit up jquery.jqGrid.src.js and jqGrid_Grouping_Example.html.

If you have any questions on how to use, feel free to contact me.

03/04/2013
22:08
Avatar
Raspberyl
Member
Members
Forum Posts: 3
Member Since:
02/04/2013
sp_UserOfflineSmall Offline

@mbiasetti, thank you so much for this. I've been looking everywhere for an answer. However, I already tried to implement it with local data but I'm not able to show the grid, even without the grouping part the grid isn't showing whatsoever, what could it be?

Could you make an example with local data to help us better understand the changes you made to the code? I see you've added an array of values to the gridCollapse parameter and it makes complete sense to me, I just don't understand why I can't get it to work. Do I need to add anything else besides the .src to my original js library?

Thanks!

04/04/2013
14:51
Avatar
mbiasetti
Member
Members
Forum Posts: 12
Member Since:
21/07/2011
sp_UserOfflineSmall Offline

Hey @Raspberyl,

Sorry you had trouble getting the example up and running. I had pulled it out of a production app and stripped out any business specific code before posting it. I didn't actually test it, so my apologies.

Here is a fiddle with a couple of working examples to demonstrate how the collapseLevels array works. Try different values in the array and see how it plays out in the grid. I think it gives the grid a much more intuitive feel regarding grouping.

Let me know if you have any questions.

09/04/2013
00:13
Avatar
Raspberyl
Member
Members
Forum Posts: 3
Member Since:
02/04/2013
sp_UserOfflineSmall Offline

Hi again!

Thank you for the example, it was very useful and I was finally able to get it to work, the only thing is that I found out two things

1) The jQgrid source doesn't work with certain versions of jquery

2) For some odd reason the last subgroup in the second to last subgroup is making the next group disappear. You can see that in your jsfiddle when you open the Blank sub group under DSK1 and then close it, it eats the next sub group thats under the number 2.

Do you have any idea how we can fix this?

09/04/2013
14:29
Avatar
mbiasetti
Member
Members
Forum Posts: 12
Member Since:
21/07/2011
sp_UserOfflineSmall Offline

Hello,

Glad to see it somewhat worked for you. To your points:

1. I have done zero testing with different jQuery versions. I can verify 1.8.3 and 1.9.2 for jQuery core and UI respectively has worked for my less than rigorous testing. 

2. The last subgroup was not appearing because the data for that field was actually a blank string "". I added in some nonsense characters so that it shows up. It was a test data set I used for something else and was intentionally blank.

From what I can tell massaging the properties on the fiddle, everything is working as intended. Hope that makes things clearer. Good luck!

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

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