ParamQuery grid support forum
General Category => Help for ParamQuery Pro => Topic started by: methney on August 28, 2014, 12:21:28 pm
-
Hi there!
I'm using groupModel. I got reference from grouping demo (http://paramquery.com/pro/demos/group_rows)
And I have a select box to choice view type.
One is grouping as default, the other is 'not grouping' (just sequential order)
but when to change to 'not grouping', here is my code
$("#grid_group_rows").pqGrid("option", "groupModel", null);
$("#grid_group_rows").pqGrid("refresh");
when executing this, there are no rows left at all.
Data are totally dispeared..
So I just tried several ways..
refresh, refreshView, refreshDataAndView..
I have used same data with this example but, I tried to load data again. looking for way around...
$("#grid_group_rows").pqGrid("option", "dataModel", {data:dataModel});
$("#grid_group_rows").pqGrid("option", "title", "Log View");
$("#grid_group_rows").pqGrid("option", "groupModel.collapsed", [false]);
$("#grid_group_rows").pqGrid("option", "groupModel", null);
$("#grid_group_rows").pqGrid("refresh");
The reason I used 'groupModel.collapsed:false' is..
It worked when data are opened (grouping mode) before I choose view type to 'not-grouping' in selectbox.
Then I change mode to 'not-grouping', And finally I could see data.
I think It redrew just in opened row.
And I also think it's not working when setting 'null' as groupModel..
I have just wasted my time since yesterday. please give me help.
If there any specific example helping me, send me please.
-
It has been answered earlier in the forum here http://paramquery.com/forum/index.php?topic=442
I've also updated the demo for you http://paramquery.com/pro/demos/group_rows
Please let me know if you need any further assistance.
-
Thanks for your reply..
But I tested...
Now I understood What options I did.
It's about the option of 'collapsed'
I made this example on jsfiddle.
http://jsfiddle.net/methney/q106rwh8/
When to push the toggle buttom having option of 'collapsed:true', it didn't make any normal rows.
But I changed the option of groupModel.collapsed : false, it worked!
I think it has problem with groupModel.collapsed:true. It's not working!
please consider this!!
thanks for your quick help! I appreciate this!!
-
I got your point. When collapsed is true grouping hides the rows and when grouping is removed, hidden rows in local data are left as hidden. This issue would be corrected in next version.
Meanwhile you can use the following code to show the hidden rows.
http://jsfiddle.net/paramquery/q106rwh8/2/
-
Thanks! I appreciate this!!