RadGridView SaveLayout Not Saving / Supposed to Save Relations?

6 posts, 1 answers
  1. Tom Chien
    Tom Chien avatar
    125 posts
    Member since:
    Jun 2009

    Posted 18 Sep 2009 Link to this post

    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.
  2. Answer
    Jack
    Admin
    Jack avatar
    2335 posts

    Posted 23 Sep 2009 Link to this post

    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.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Tom Chien
    Tom Chien avatar
    125 posts
    Member since:
    Jun 2009

    Posted 25 Sep 2009 Link to this post

    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?  ;)
  5. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 28 Sep 2009 Link to this post

    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.
  6. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 28 Sep 2009 Link to this post

    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

  7. Nick
    Admin
    Nick avatar
    767 posts

    Posted 29 Sep 2009 Link to this post

    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.
Back to Top
UI for WinForms is Visual Studio 2017 Ready