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

Hide/Show Columns using external control

2 Answers 84 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Bryan
Top achievements
Rank 1
Bryan asked on 17 Oct 2016, 11:13 AM

Hi,

 

I have a dynamically created grid, it has column groups and in each group is lets say column A, B, C, D

These columns have different dates to make up their unique name.

so we could have  201601-A, 201601-B, 201601-C, 201601-D      201602-A, 201602-B, 201602-C, 201602-D

This causes issues when trying to use the context menu to hide show columns as it displays each unique column, the user would like to hide/show all "A"'s or "B"'s etc.. 

I would like to give them a check box outside the grid and allow them to select what columns types (A or B or C or D) to hide show. 

Is this possible?

 

Thanks for your help

2 Answers, 1 is accepted

Sort by
0
Bryan
Top achievements
Rank 1
answered on 17 Oct 2016, 11:17 AM
Preferably i would like a way to group the columns in the context hide/show drop down that telerik provides as this would then work with the persistence framework
0
Eyup
Telerik team
answered on 20 Oct 2016, 06:10 AM
Hi Bryan,

You will need to assemble and configure your separate custom RadMenu, RadWindow, RadToolTip, etc., whichever you prefer:
http://demos.telerik.com/aspnet-ajax/menu/examples/functionality/templates/defaultcs.aspx

Once you have the menu ready, you can use the client-side API provided by RadGrid to add the required functionality to its items. For example, depending on whether the checkbox is checked or unchecked, you can show or hide the corresponding column:
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/methods/showcolumn
http://docs.telerik.com/devtools/aspnet-ajax/controls/grid/client-side-programming/gridtableview-object/methods/hidecolumn

In addition, I am also sending 2 sample web sites which you may deem helpful.

Regards,
Eyup
Telerik by Progress
Check out the new UI for ASP.NET Core, the most complete UI suite for ASP.NET Core development on the market, with 60+ tried-and-tested widgets, based on Kendo UI.
Tags
Grid
Asked by
Bryan
Top achievements
Rank 1
Answers by
Bryan
Top achievements
Rank 1
Eyup
Telerik team
Share this question
or