HiIs there any way to select all child elements after selecting the groupto which they belong when using the grouping and multiselect featureson igCombo?
http://codepen.io/anon/pen/VKbWbr
Here is a codepen with the code i am using
Thanks
Hello Paulo,
In order to select group, onclick can be handled for the grouping header and then then the data source can be filtered to get only the items from that group and select the items by using the value method.
$('.ui-igcombo-group-header').on('click', function() { var clickedGroup = $(this).text(); var valuesToSelect = colors.filter(function(item) { return item.Type == clickedGroup; }).map(function(item) { return item.Name; }); $('#checkboxSelectCombo').igCombo("value", valuesToSelect);});
$('.ui-igcombo-group-header').on('click', function() { var clickedGroup = $(this).text();
var valuesToSelect = colors.filter(function(item) { return item.Type == clickedGroup; }).map(function(item) { return item.Name; });
$('#checkboxSelectCombo').igCombo("value", valuesToSelect);});
You can refer to the updated codepen.
Let me know if you have further questions on this matter.
Thank you very much.Works just fine.
It would be a good idea to add a native feature for this case.
You can suggest selecting a group in combo, when grouping enabled as new product ideas for future versions (or vote for existing ones) at http://ideas.infragistics.com.
There are many benefits to submitting a product idea:
Steps to create your idea:
The Product Idea site puts you in the driver’s seat and allows you to track the progress of your ideas at any time, see how many votes it got, read comments from other developers in the community, and see if someone from the product team has additional questions for you.