Hi,
Currently we have enabled igTreeGridHiding feature on our igTreeGrid. The default behavior is that the gear icon appears on each column.
Is there a way to allow the gear icon to only show up on 1 column? Or to hide/remove the icon, and have a custom button, which when pressed, would display the column chooser?
Thanks,
CR
Hello C R,
If you want to have only one gear icon, an option is to disable features for the columns you don't want to have them through the respective features columnSettings option, for instance: http://www.igniteui.com/help/api/2016.1/ui.igtreegridhiding#options:columnSettings. Here is also a jsFiddle sample for your reference: http://jsfiddle.net/7trvgmpb/
If you want to keep the features enabled and only hide the gear icon from certain column, then you may use headerRendered event and detach the gear icon element from the DOM, for instance:
headerRendered: function(evt, ui) { ui.table.find("th[id=grid_EmployeeID] div.ui-iggrid-indicatorcontainer").detach(); }
If you have further questions, please let me know.
Regards,Tsanna
Thank for your help on this.
Follow up question - I have a custom context menu. I would like to trigger rendering the column chooser on selection of an item from this menu.
I tried calling $("#GridId_hiding_modalDialog").show() - This shows me only the dialog window but no content.
Any suggestion on how I can accomplish this ??