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

Kendo UI columnMenu default column selections

3 Answers 126 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Andrew
Top achievements
Rank 1
Andrew asked on 27 Jul 2016, 10:00 PM

Hi. I am working on an Angular project which used Kendo Grid. I am aware that I can use the columnMenu property to give users the ability to filter columns that they want to see. Is there any way I can show some columns as default?

This is my first post. please bear with me.

 

-AZ

3 Answers, 1 is accepted

Sort by
0
Kiril Nikolov
Telerik team
answered on 29 Jul 2016, 07:39 AM
Hello,

I am not sure that I understand exactly the request, however I have two suggestions:

1. If you want to filter by default, you can set the filters, using the filter() method of the dataSource, as shown here:

http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-filter

2. You can use the columnMenuInit event and manipulate the content of the menu there, as documented here:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#events-columnMenuInit

In case this did not help - please elaborate a bit more.

Regards,
Kiril Nikolov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
0
Andrew
Top achievements
Rank 1
answered on 01 Aug 2016, 02:43 PM

Hi Kiril,

Thanks for replying. Let me try to rephrase my question.

Let's say I have two columns in my grid, col A and col B. I want to hide col A when the grid displays initially and users should be able to show col A by marking the checkbox in the column menu later on. Does it make more sense?

I think columnMenuInit is the way to go but I have not find a way to hide a column yet.

 

-Andrew

0
Kiril Nikolov
Telerik team
answered on 02 Aug 2016, 07:06 AM
Hi,

See the following documentation article:

http://docs.telerik.com/kendo-ui/api/javascript/ui/grid#methods-hideColumn

Regards,
Kiril Nikolov
Telerik by Progress
 
Get started with Kendo UI in days. Online training courses help you quickly implement components into your apps.
 
Tags
Grid
Asked by
Andrew
Top achievements
Rank 1
Answers by
Kiril Nikolov
Telerik team
Andrew
Top achievements
Rank 1
Share this question
or