Forum
15:44
21/07/2011
Hello,
When trying to use multi-level grouping, there seems to be odd behavior when using
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.
14:10
Moderators
30/10/2007
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.
15:30
21/07/2011
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.
22:08
02/04/2013
@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!
14:51
21/07/2011
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.
00:13
02/04/2013
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?
14:29
21/07/2011
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!
Most Users Ever Online: 715
Currently Online:
275 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