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
765
IgGrid with hidding feature select columns in client side in cicle
posted

Hello

I have my iggrid in MVC3, I'm using version 2011.2, I wonder if it is possible to use the feature Hidding, I can hide all the columns, and make a loop to display only the columns that are needed.

I want to do client side, it will be possible to do this.

regards
Thanks in advance.

Parents
No Data
Reply
  • 24671
    posted

    hey,

    i think it's better to just define the columns you would like to show . Is there any reason you'd like to do the opposite?

    It's possible via the hiding API (yep you can use the hiding since it's a 11.2 feature) 

    http://samples.infragistics.com/jquery/grid/column-hiding-using-api

    you can iterate through the columns and get their keys in the following way:

    var cols = $("#grid").igGrid("option", "columns");

    for (i = 0; i < cols.length; i++) {

        var key = cols[i].key;

       $("#grid").igGrid("hideColumn", key);

    }

    Hope it helps. Thanks

    Angel

Children
No Data