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

Dynamically show/hide column

3 Answers 150 Views
Grid
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Jerry
Top achievements
Rank 1
Jerry asked on 17 Nov 2011, 02:59 AM
Hi there,

Is it possible to show/hide a column based on the column name?

If so, could you give me one example?


thank you


regards
Jerry Ren

3 Answers, 1 is accepted

Sort by
0
Accepted
Nikolay Rusev
Telerik team
answered on 17 Nov 2011, 08:19 AM
Hello Jerry,

With Q3 Release of Telerik Extensions for ASP.NET MVC which happened yesterday we introduced client API for showing/hiding columns. I.e grid.showColumn/hideColumn("column name")

There is also a column  header context menu for showing/hiding columns. You can see more on the demo bellow:http://demos.telerik.com/aspnet-mvc/grid/columncontextmenu


Greetings,
Nikolay Rusev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
0
Jerry
Top achievements
Rank 1
answered on 18 Nov 2011, 12:35 AM
Thank you, good news.


Could you tell me where can I find the documentation for the latest release?
I tried here, but cannot find anything related to show/hide column.


I don't think the columncontextmenu sloves my problem, I need to show/hide column based on user's action.

appreciated


regards
Jerry Ren
0
Nikolay Rusev
Telerik team
answered on 21 Nov 2011, 11:03 AM
Hello Jerry,

The documentations for this feature is missing. This api is quite simple: showColumn/hideColumn takes the name of the field to which the column is bound to or the index of the column in client columns collection.

I.e grid.hideColumn("OrderID") or grid.hideColumn(0)

Regards,
Nikolay Rusev
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the Telerik Extensions for ASP.MET MVC, subscribe to their blog feed now
Tags
Grid
Asked by
Jerry
Top achievements
Rank 1
Answers by
Nikolay Rusev
Telerik team
Jerry
Top achievements
Rank 1
Share this question
or