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

RadGridView SaveLayout Not Saving / Supposed to Save Relations?

5 Answers 111 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Tom Chien
Top achievements
Rank 1
Tom Chien asked on 18 Sep 2009, 09:13 PM
I might have just answered my own question but just in case, I noticed that RadGridView's SaveLayout is saving ChildGridViewTemplates but not their Relations.  "What good is a ChildGridViewTemplate without its Relation?", I asked myself.  Then I realized that it may just be saving ChildGridViewTemplates for the their other settings (i.e. Column visibility, order, width, sorting, filters, formatting, etc.).  Correct?

Telerik 2009Q2 (2009.2.9.729), VS 2005 (v8.0.50727.762 SP.050727-7600), XP SP3 on Core2Duo 2.99GHZ with 3GB.

5 Answers, 1 is accepted

Sort by
0
Accepted
Jack
Telerik team
answered on 23 Sep 2009, 03:06 PM
Hi Tom, yes, you are correct. 

By design Save/LoadLayout functionality preserves all selected settings that are not related with the data source. This way the same layout can be applied on a different data source. However, we will consider adding this option in future.

Should you have any other questions, please don't hesitate to ask.

Best wishes,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Tom Chien
Top achievements
Rank 1
answered on 25 Sep 2009, 04:36 PM
Welllll, "not related with the data source" is kind of a vague requirement.  You currently store Column Names.  You couldn't just associate them with just any Data Source because they may not make any sense.  Same with Conditional Formatting and I would argue same with Relations.

I appreciate that your team will "consider" adding them.  Any points since you're going to  "consider" it?  ;)
0
Jack
Telerik team
answered on 28 Sep 2009, 12:07 PM
Hi Tom,

Yes, you have a point and I updated your Telerik points accordingly. If you have any other questions, please contact me back.

Kind regards,
Jack
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
erwin
Top achievements
Rank 1
Veteran
Iron
answered on 28 Sep 2009, 03:26 PM
IMHO reloading the grid layout to a datasource that is not identical to the original leads to unexpected results. In my case, column names in the datasource but not in the layout did not show up after reload whether in the grid nor in the column chooser.
Also a headache if you upgrade your application and have existing layouts on client machines.

In practice you have to implement checks to make sure the grid layout you reload was saved from the very same datasource layout.
To be safe, I'd even suggest checking the version of the telerik framework. (In my app I check the build number of the app and reject loading a layout that was saved by an earlier version).

regards
erwin

0
Nick
Telerik team
answered on 29 Sep 2009, 12:52 PM
Hello erwin,

Thank you for contacting us. We understand your concerns. As RadGridView gets more mature, differences across releases will not really affect save/load layout but currently it is better that you prevent the case where users use saved layout from a previous version. You should also avoid using a layout file for grids having different data source. You have to enforce that policy in some custom way. Do no hesitate to write me back if you have further questions.

All the best,
Nick
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
GridView
Asked by
Tom Chien
Top achievements
Rank 1
Answers by
Jack
Telerik team
Tom Chien
Top achievements
Rank 1
erwin
Top achievements
Rank 1
Veteran
Iron
Nick
Telerik team
Share this question
or