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

Autogenerated columns and persisting grid settings

2 Answers 73 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Shipu
Top achievements
Rank 1
Shipu asked on 21 Feb 2012, 01:24 PM
Hi,
I have read and installed the demo at http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx

Using the demo code it is possible to hide columns and save settings and then reload settings without the hidden columns - this works great.  However, when MasterTableView.AutoGenerated is set to True to dynamically build the column set, the column settings do not seem to work.

Steps to recreate issue:
1.Install demo at http://demos.telerik.com/aspnet-ajax/grid/examples/programming/savinggridsettingsonperuserbasis/defaultcs.aspx
2. In MasterTableView change AutoGenerateColumns to true
3. Optional step: remove <Columns> section.
4. Load grid, hide any columns and save under User1.
5. Right click on column heading to display the hidden columns.
6. Select User1 and Load Settings - at this point the grid should redisplay with without the hidden columns.

As mentioned the above steps works perfectly if the autogenerated=false, therefore I am thinking there may be some issue with persisting autogenerated columns.  We have a demo using this autogenerated columns in 2 days time and would therefore appreciate any help regarding this issue.

Thanks
Shipu

2 Answers, 1 is accepted

Sort by
0
Accepted
Andrey
Telerik team
answered on 24 Feb 2012, 10:30 AM
Hello,

The example that is shown in the online demo is configured to run with declaratively added columns. If you want to use autogenerated column you need to change a bit the declaration.

I have made a sample project to show you the approach that you need to use.

Kind regards,
Andrey
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 RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0
Shipu
Top achievements
Rank 1
answered on 27 Feb 2012, 04:45 PM
Hi Andrey,
Many many thanks for looking into this issue.  The sample code you provided has resolved my problem that I had been struggling with for awhile.  Once again thank you for your help.

Regards
Shipu
Tags
Grid
Asked by
Shipu
Top achievements
Rank 1
Answers by
Andrey
Telerik team
Shipu
Top achievements
Rank 1
Share this question
or