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
215
Can I remove any column checkbox from show/hide column dropdown?
posted

Out of 7 columns, last column contain a delete icon without a column header. I do not want to show this column checkbox(as it appears blank without the header) in the show/hide dropdown. 

As it can be seen in the below image, one blank checkbox is listed down. Can this blank checkbox be removed programmatically?

Parents
  • 720
    Verified Answer
    Offline posted

    Hello Minakshi,

    Thank you for contacting Infragistics Community!

    In order to remove a column from the default column hiding dropdown list (placed within the igxGrid toolbar) you can set the column’s disableHiding property to true as stated in the Disable hiding of a column section within the Column Hiding topic. Please note that this will not only remove the column from the list but indeed when clicking over the “Hide All” button the column decorated with the disableHiding property will remain in the grid.

    In your case after clicking over the “Hide All” button all of the columns will get hidden except for the one containing the delete buttons. If you want to not let this column to be the only one which is not hidden an additional logic should be implemented on application level. You can refer to the following sample I have prepared for you. As you can observe, subscribing to the hiddenChange event (emitted when a column changes its hidden property) of each igxGrid’s columns you can invoke a function checking the number of the visible columns within the grid and applying your own logic depending on this number.

    In the attached sample if all of the columns except the one containing the delete buttons (deleteColumn) are hidden, the deleteColumn would be hidden as well. If at least one of those columns is visible, the deleteColumn would be visible as well.

    Please keep in mind that as mentioned this should be implemented on application level which is beyoud of the scope of Infragistics support. Having this in mind, we will not update the provided sample with any additional implementation but you can feel free to ask questions regarding the current approach.

    Thank you for using Infragistics Components!

    Best Regards,
    Martin Evtimov
    Associate Software Developer
    Infragistics, Inc.

Reply Children
No Data