jQWidgets Forums
jQuery UI Widgets › Forums › Grid › Group rows selection
Tagged: jqxgrid grouping selection
This topic contains 2 replies, has 3 voices, and was last updated by jleonard 9 years, 2 months ago.
-
AuthorGroup rows selection Posts
-
Hello,
I’m creating a group renderer to offer the possibility to select/unselect all group’s rows when clicked. My approach is to paint an html element like a div and bind it to an onclick event wich recieves a coma separated list of all group rows to programatically select/unselect them.
I also want to expand a group when the group row is clicked and the group is collapsed. So, I need to know wich group I’ve got to collapse/expand.
I’ve achieved to select/unselect the group’s rows when header row clicked, but when I want to know wich group I wan’t to expand/collapse, the API offers me a expandgroup method wich recieves an integer and I don’t know how to retrieve it.
$('#jqxGrid').jqxGrid('expandgroup', 1);
I found it very dificult to work with groups when I want to take a group’s info with its name because in the API I’ve only founded the function getgroup, wich have the same problem as I mentioned before.
var group = $('#jqxGrid').jqxGrid('getgroup', 0);
This function also recieves an integer identifying the group, not the group’s name. My question is: how can get this group id programatically? In the demos you provide a text input to enter group’s id so it is not usefull for my problem. In your roadmap you don’t provide any info talking about group questions, are you thinking about improving grouping functionality?
I post the grouprenderer code:
var groupsrenderer = function (text, group, expanded, data) { var strIdsObject = new Array(); for(var i=0;i<data.subItems.length;i++){ strIdsObject.push(data.subItems[i].boundindex); } strIdsObject = strIdsObject.toString(); var html = '<div id="'+groupSelectorId+'" style="border: 1px solid #CCCCCC; border-radius: 3px;height: 13px; margin: 5px 8px 5px 8px; width: 13px;" '+ 'onclick="zen(\''+this.columns.owner.id+'\').selectGroupItems('+expanded+',\''+strIdsObject+'\');"/>'; return html;
Thank you very much!
Hi dpibt,
Unfortunately, we cannot offer a solution for selecting/unselecting all rows within the groups. There is no API for getting the group’s ID or for expanding/collapsing a sub group through code. I am afraid that, we do not have plans to make any changes in the Grid’s API or Grouping logic.
Best Regards,
Peter StoevjQWidgets Team
http://www.jqwidgets.comHi there,
Is there a way of selecting/unselecting rows within a Grid group. I’ve found this answer above saying that there was not an API to do that. Is that still a fact?
Thanks
JL -
AuthorPosts
You must be logged in to reply to this topic.