Hello, i am working with an Iggrid, and i am trying to use the Hiding feature.
right now is working well, but i want to add to the hid column not being able to show by the user, just by code. So i want to hid also the rectangle on the header for avoiding showing the column again. i have done this but in the constructor of the grid like in the second block of code, but i need it now in asyncronous way in javascript.
if ($(this).context.value != "Any") { //This point is when i need to do the hiding, after the loading of the grid $("#candidate-list-static").igGridHiding("hideColumn", $(this).context.name); } else { $("#candidate-list-static").igGridHiding("showColumn", $(this).context.name); }
Second Block of Code
{ name: 'Hiding', columnSettings: [ { columnKey: 'ItemId', allowHiding: false, hidden: true } ],
},
Hello Juan,
You have 2 options:
1. Not using Hiding feature at all - the igGrid has the hideColumn/showColumn API. This way there will be no end user UI (There will be no rectangle on the header).
2. Configure all of the columns in the Hiding columnSettings as allowHiding: false. Then at run-time you can use the igGridHiding.hideColumn/igGridHiding.showColumn API.
Hope this helps,Martin PavlovInfragistics, Inc.
Thanks for your answer martin, i am still having troubles with the first one , y find a way for doing the hiding by css but right now i am having troubles handling the Hiding events. would you mind posting and example of how to handle a callback after the event is triggered like the nex:
$("#candidate-list-static").igGridHiding("hideColumn", $(this).context.name,[],[function() { alert("Hiding"); }]);
This do the hiding, but the event is never triggered. I appreciate any help thanks.