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

Two Questions: Saving/loading settings between sessions and Allowing users to hide columns at run-time

3 Answers 66 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
Matt
Top achievements
Rank 1
Matt asked on 22 Nov 2013, 09:47 PM
We currently have a series of hierarchical radgrids that we'd like to replace with the treelist control.  I've gotten most of the basic work done w/ regard to porting from the grid to the treelist, but I can't locate information on how to save / load user settings (e.g., column size, sort order, etc.).  (We use the TelerikGridHelper for our rad grids and it works like a champ.)  Is there an equivalent tool for saving the treelist settings?

Also, we provide our users with the ability to group columns, sort columns and show/hide columns in the radgrid using the header context menu.  How is this done for a tree list?  Again, I've looked for it in the documentation, but I'm either overlooking it or it's not there.

thanks -
matt

3 Answers, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 27 Nov 2013, 09:18 AM
Hi Matt,

Thank you for contacting us.

You can use RadPersistenceFramework:
http://demos.telerik.com/aspnet-ajax/persistence-framework/examples/overview/defaultcs.aspx
As demonstrated in the updated demo:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/persisting-grid-settings/defaultcs.aspx?product=grid

As for creating a header context menu, you can use the client-side API of the TreeList:
http://demos.telerik.com/aspnet-ajax/treelist/examples/client/resizing/defaultcs.aspx
Combined with a RadContextMenu:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/treelistwithcontextmenu/defaultcs.aspx?product=treelist

Hope this helps. Please let us know if you need further assistance.

Regards,
Eyup
Telerik
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 RadControls for ASP.NET AJAX, subscribe to the blog feed now.
0
Matt
Top achievements
Rank 1
answered on 02 Dec 2013, 05:15 PM
Thanks for the links to the demos.  Unfortunately, I'm unable to get the context menu to show when the user right-clicks on the column header.  (We require a context menu for the actions users can take on each item, so using the item context menu to show/hide columns in not a viable solution.)

In our radgrid implementation, we simply use the built in context menu functionality.  Can you provide a sample of how to implement this in a treelist?

Also, based on what I saw here, it doesn't appear the persistence control will work as it doesn't store column settings (e.g., visibility, size, etc.).  Is my interpretation of this incorrect or can these values indeed be stored between sessions?
0
Eyup
Telerik team
answered on 05 Dec 2013, 03:33 PM
Hi Matt,

I have created a sample web site to demonstrate how you can achieve the HeaderContextMenu for
RadTreeList. Please run the attached application and let me know if it helps you.

As for the PersistanceFramework query, in this case you can use custom settings:
http://demos.telerik.com/aspnet-ajax/persistence-framework/examples/custom-settings/defaultcs.aspx

I hope this will prove helpful.

Regards,
Eyup
Telerik
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 RadControls for ASP.NET AJAX, subscribe to the blog feed now.
Tags
TreeList
Asked by
Matt
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Matt
Top achievements
Rank 1
Share this question
or