Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
105
Hide a columns and put allowHiding false
posted

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 }
],

},

Parents
  • 23953
    Suggested Answer
    Offline posted

    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 Pavlov
    Infragistics, Inc. 

Reply Children