Add a visible property to the column items for the grid control.
Add a visible property to the column items for the grid control. Then provide the value in the view-model. This would allow us to declare the columns in html and manage their visibility in the business logic.
This setting is called “hidden”. Available since Q2 2012
Jamie Stroud commented
The hideColumn() method only hides the data column; does not hide the corresponding column header, which seems counter-intiutive to me.
Alex Burr commented
I think they added this in the latest release, with the columnMenu flag and the hideColumn()/showColumn() methods.
Soumik Datta commented
Please I need Kendo Grid Column visibility property as soon as possible. It will solve a lot of headache..
Dr. YSG commented
I added a kendoWindow popup that shows all the available fields in a datasource that is bound to the Grid. Now I want the user be able to turn on or off particular columns. The kendoWindow is filled with checkboxes filled in from the datasource (and a SELECT ALL checkbox on top that is tri-state for selecting all, some or none of the other boxes.
I offer my code to you as an example of what I would like
John F Kidd commented
I primarily need to hide columns that show information that certain user roles do not have access to. The ability four the view-model to advise on column showing/hiding would be what I am after. Also a UI method of hiding columns - the 'sister' Telerik grid can do this already.
John F Kidd commented
yes, if the user is, say a super user, then we can show a full set if columns, else hide individual columns at runtime
Cosmin Duta commented
Take flexigrid for example, every column has a small down arrow frow where you can choose which columns you want displayed or hidden. I think a button showing a drop-down with available columns on the right side of the header will do just fine.
I am working to implement this functionality myself for now, because the client is strongly insisting in showing / hiding columns on the grid, so no other choice for now.
Marc-André Gauthier commented
Do you mean the user could be able display hidden columns at run time from a list of available columns ? I need that too.