This is a migrated thread and some comments may be shown as answers.

Show only certain columns upon initialization but allow users to add them in column menu

2 Answers 407 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bryan
Top achievements
Rank 1
Bryan asked on 12 Jul 2016, 03:30 PM

I have a grid whose datasource contains about 20 items. 

I would like to open the view with some default column (say five) and then allow the user to make a selection from the column menu.

Cannot see that there is a way to do this.

Any help would be greatly appreciated.

Bryan

2 Answers, 1 is accepted

Sort by
0
Stefan
Telerik team
answered on 14 Jul 2016, 12:55 PM
Hello Bryan,

This can be achieved by using the columns.menu configuration of the Kendo UI Grid. This configuration will allow the user to customise which columns to be displayed in the Grid view:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.menu

In addition, if you want to show only some of the columns by default, use the columns.hidden configuration of the Grid to hide specific columns programmatically:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#configuration-columns.hidden

Let me know if need additional information on this matter.

Regards,
Stefan
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Bryan
Top achievements
Rank 1
answered on 18 Jul 2016, 02:03 PM
Thanks that works great.
Tags
Grid
Asked by
Bryan
Top achievements
Rank 1
Answers by
Stefan
Telerik team
Bryan
Top achievements
Rank 1
Share this question
or