Problem with LoadLayout

71 posts, 0 answers
  1. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 21 Oct 2010 Link to this post

    Hello,

    I'm also on SP2 and still have the problem described by Panos Klaoudatos on Aug 24, i.e. columns saved in layout are displayed even when they no longer exist in the data source and new columns in the data source are not displayed. I have raised a ticket but thought I'd let people know this problem does not seem to be resolved.

    Regards,
    Mark Leavesley
  2. Emanuel Varga
    Emanuel Varga avatar
    1336 posts
    Member since:
    May 2010

    Posted 21 Oct 2010 Link to this post

    Hello Mark,

    I think the issue of removed columns / added columns should be another discussion altogether, me for one, i would prefer that no layout should load when there are inconsistencies between the old data source / the new one.

    This could introduce a series of problems, like:
    - New columns that should have more space than the old ones,
    - new columns have been added that should have been invisible but after loading the layout the grid made them visible (because they are new),
    - missing format information and so on.

    This might be just my opinion, but i wanted just to point out a few things that could happen if the grid would treat all new data as visible by default.
    Maybe there could be a property to enable this behavior but i don't think it should be enabled by default.

    Hope this helps, if you have any other questions or comments, please let me know,

    Best Regards,
    Emanuel Varga


  3. UI for WinForms is Visual Studio 2017 Ready
  4. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 21 Oct 2010 Link to this post

    See my earlier post in this thread.

    Generally it's not a good idea to

    -    try to load a layout that was saved with an earlier version of telerik controls
    -    try to load a layout form when the layout (columns, data types etc) of the datasource has changed since last save

    in the past trying to do this lead to strange effects. Also because clients had different update paths/schedules for my app it was very hard to test all the different combinations of versions for saved layouts.
    IMHO it's best to prevent an application to load layouts that were created with another build.

    Would be nice if Telerik would put in additional checks, for example method like IsSafeToLoadLayout(filename), so that an application can inform the user when a saved layout has to be discarded.

    Regards
    Erwin

  5. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 21 Oct 2010 Link to this post

    Hi,

    I don't know if this suggestion will help anyone but I'll offer it up anyway. In our application, where we let the user save the layout, we save an initial layout that we can revert back to. Then let the user save a custom layout

    When we load the layout, we check the accessed date of the layouts aginst the date of the main executable. If the executable is newer then we delete the layouts and start again. The disadvantage is that on a new executable the user doesn't get the layout they previously saved, but on the plus side we never get the issues of versioning or changed data sources.

    All the best
    Richard
  6. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 21 Oct 2010 Link to this post


    I do something similar, by including the program version/revision information in a wrapper around the layout xml.
    This also prevents the user from loading a layout in an older version of the application, for example when they revert to an earlier release because of showstopper bugs in the new build - unfortunately quite common with the recent telerik releases.

    Regards Erwin
  7. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 22 Oct 2010 Link to this post

    Hello,

    Surely it would be easy enough for LoadLayout to match columns in the layout to the datasource, discard what cannot be matched in the layout and to apply a default format to new columns? If they put it behind a non-default option that is fine. But I now have the farcical situation where 95% of the columns cannot have their format saved/loaded between sessions because 5% of the columns are not consistent. Telerik say check the IsDataBound property and remove extraneous columns, but what about new columns? They still don't show.

    So now I'm looking at saving/loading layouts myself or at least manipulating the existing process, anybody any pointers on how to do this? I'm kind of thinking of excluding the dynamic columns from the saved layout though I am still not sure how to get new columns to appear, perhaps inject them into the loaded layout as it is processed? What a lot of faff.


    Regards,
    Mark Leavesley
  8. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 22 Oct 2010 Link to this post

    Hello mark, 

    Please accept my apologies for the delayed answer.

    Basically, the Save/Load Layout works the following way - when you load the layout and the previous Columns schema does not contain the current DataSource fields, you can not view the data. The layout does not reflect any changes you have made to the data set. It simply saves the current columns and loads them. If it can not find some of the saved columns, it adds them with No Data. 

    We do not have plans to modify the default behavior of the Save/LoadLayout functionality. However, we will provide an event in Q3 2010 which will be fired when the layout is loaded. You will be able to handle this event and add the necessary new columns (and remove the unneeded ones).

    If you have any other questions, do not hesitate to open a new thread/support ticket. 

    Sincerely yours,

    Stefan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  9. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 22 Oct 2010 Link to this post

    Hello,

    When can we expect Q3? Unless it's next week we will have to implement our own layout save/load.


    Regards,
    Mark Leavesley
  10. Richard Slade
    Richard Slade avatar
    3000 posts
    Member since:
    May 2009

    Posted 22 Oct 2010 Link to this post

    Hi Mark,

    I understand Q3 is out the first half of November, not next week.
    All the best
    Richard
  11. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 22 Oct 2010 Link to this post

    Hello mark, 

    Richard is right about the release date of Q3 2010. Unfortunately, there is nothing that can be done until the official release.
     
    Greetings,
    Stefan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  12. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 22 Oct 2010 Link to this post

    Hello,

    That is kinda almost next week...and a bit. We'll wait for Q3 then, fingers crossed this is the answer.


    Regards,
    Mark Leavesley
  13. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 22 Oct 2010 Link to this post

    Let's just hope the quality of the Q3 release will not be as bad as Q2 and we will not have to wait for SP2 again until it becomes usable.

    Fingers Crossed
    Erwin
  14. devoas
    devoas avatar
    69 posts
    Member since:
    Dec 2009

    Posted 23 Oct 2010 Link to this post

    Hi,

    I will be really thankful if any telerik expert can advise about my query regarding LoadLayout  incase of  MultiRow Header. Following is the detail I have submit couple of days back... 

    "We tested 2010.2 10.914 and found a problem in LoadLayout incase of multiple Header Rows
    Grid is Databound and there are multiple Header Rows, after Loadlayout  no Data is shown in Grid but same work perfectly and showing Data if there is single Header Row.

    Please confirm if this is an issue in latest build."

    Thanks.
    devoas.
  15. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 27 Oct 2010 Link to this post

    Hello devoas,

    Thank you for writing.

    Currently, the Save/Load Layout does not support the functionality of saving RadGridView with multiple header rows. This is why you are experiencing the described behavior. However, your suggestion seems quite reasonable and I will add it as a feature request to our PITS (Public Issue Tracking System). You can follow this link in order to vote for this request and get notified about its status updates. 

    Your Telerik points have been updated for this request. 

    I hope this information addresses your question. If there is anything else I can assist you with, do not hesitate to contact me.
     
    All the best,
    Stefan
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  16. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 15 Nov 2010 Link to this post

    Hello,

    I have raised a ticket but though I would share my experience with the wider community.

    I have found what I think is the new event referred to, but the documentation is so poor I cannot be certain. The event is 'LayoutLoaded', the API page is here:

    http://www.telerik.com/help/winforms/e_telerik_wincontrols_ui_radgridview_layoutloaded.html

    Can anybody advise me on how to use this? Or point me to (better) documentation?

    Regards,
    Mark Leavesley
  17. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 17 Nov 2010 Link to this post

    Hi mark,

    Thank you for writing back.

    As the name of the event implies, the LayoutLoaded event is fired after the layout has been loaded. In the event handler of the event you can check if the columns from the layout match the ones from the data source and take appropriate actions if they do not. 

    I hope this will solve your case. As to the documentation, we are currently working on it and it will be uploaded soon.

    If there is anything else I can assist you with, do not hesitate to open a new support ticket or forum thread.

    Regards,
    Stefan
    the Telerik team
    See What's New in RadControls for WinForms in Q3 2010 on Wednesday, November 17, 11am Eastern Time: Register here>>
  18. mark leavesley
    mark leavesley avatar
    56 posts
    Member since:
    Sep 2012

    Posted 18 Nov 2010 Link to this post

    Hello,

    I've been waiting for this event to solve my layout problems only to find the event does not actually enable or facilitate anything whatsoever. I was under the impression this event would give me the ability to manipulate the layout before it is actually processed so that I can make it match the datasource. Whatever I need to do to fix my issue could have been done directly after the call to LoadLayout and we need not have made the client wait.

    I've had to wait additional days on going back and forth on the ticket to find this out because the documentation is not there.

    Well if that doesn't make me mad <grr>


    Regards,
    Mark Leavesley
  19. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 23 Nov 2010 Link to this post

    Hello mark leavesley,

    Thank you for writing back.

    In case we understood your requirement correctly, you requested the following: after loading the layout (which was previously saved) remove the columns which do not exist in the present data source and add the columns which are in the dataset and which do not appear in the saved layout. You have requested an event which will fire when the layout is loaded. 

    All this is possible using our latest release - Q3 2010. Please follow these steps:

    1. Handle the LayoutLoaded event
     in order to know when the column changing is needed.
    2. In the event use the DeferRefresh method (in using statement) or simply between BeginUpdate and EndUpdate methods
    3. iterate through the loaded columns, check which one does not exist in the data set any more and remove it.
    4. While in this block iterate the data set and check which columns are not in the Columns collection of RadGridView and add them.

    I hope this helps and that we understood your scenario correctly. In case you have further questions, please write back.

    Greetings,
    Stefan
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  20. Khizar Khan
    Khizar Khan avatar
    41 posts
    Member since:
    Jan 2010

    Posted 23 Nov 2010 Link to this post

    Thanks,

    This is very help ful information and a useful feature.
    Can you please give some code example to handle column missing and added in datasource or any documentation.

    Regards,
    Khizar
  21. Stefan
    Admin
    Stefan avatar
    2891 posts

    Posted 26 Nov 2010 Link to this post

    Hi guys, 

    Please find attached a sample project that demonstrates the discussed behavior when load layout is used. 

    Should you need any other assistance, do not hesitate to contact me.
     
    Best wishes,
    Stefan
    the Telerik team
    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  22. Marc-Andre
    Marc-Andre avatar
    47 posts
    Member since:
    Jan 2009

    Posted 06 Dec 2010 Link to this post

    Hi, thanks for your help I've been searching for a solution and it seems like this is close to what I need.

    I just want to know your thoughts on a situation I'm having. If I add a column to the datasource and add the column to the grid in VS designer, I can customize the header text or change the format of that column. If, on older version of my application didnt have that column and I load the layout, the new column is not available in the grid or in the column chooser.

    The solution you provided is good if you want to add that new column as is, but what if you customized it with a different hearder text, or format in VS?

    Let me know if I'm not clear enough my english is not the best...

    thanks
  23. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 09 Dec 2010 Link to this post

    Hi Marc-Andre,

    In this situation, after you load the layout the new column will be removed. For your case, an appropriate solution is to save the layout of RadGridView before the grid is shown to the user. For exmple, you can do it in the Load event of the Form object - this will save your added column with all of its settings for header and formatting.

    Best wishes,
    Julian Benkov
    the Telerik team

    Get started with RadControls for WinForms with numerous videos and detailed documentation.
  24. devoas
    devoas avatar
    69 posts
    Member since:
    Dec 2009

    Posted 20 Jan 2011 Link to this post

    Hi,

    We tested 2010 Q3SP1 and found a problem in LoadLayout incase of multiple Header Rows  still exist. 
    Grid is Databound and there are multiple Header Rows, after Loadlayout  no Data is shown in Grid but same work perfectly and showing Data if there is single Header Row.

    Please confirm when this issue will be resolved.

    Thanks.
    devoas.
  25. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 25 Jan 2011 Link to this post

    Hi Dev,

    Currently, we do not have a specific time frame set for the reported issue, because of other important issues and improvements. We will address it in a future version. The priority of issue can be changed if we have more reports from our customers about the same task.

    Thank you for your time.

    Kind regards,
    Julian Benkov
    the Telerik team

    Q3’10 SP1 of RadControls for WinForms is available for download; also available is the Q1'11 Roadmap for Telerik Windows Forms controls.
  26. Hilda Kenny
    Hilda Kenny avatar
    43 posts
    Member since:
    Jul 2009

    Posted 13 Apr 2011 Link to this post

    Hilda, as I mentioned in one of your support tickets, there is a small issue in the Downloads section. You can find the latest version in Your Account >> Downloads >> RadControls for WinForms >> Older Versions.

    Regards,
    Nikolay
    the Telerik team

    ^   The latest in the list is my current build  2010.2.10.914    Am I stuck with this?
  27. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 18 Apr 2011 Link to this post

    Hi Hilda,

    At the time of my response our latest version was 2010.2.10.914 - a Service Pack of Q2 2010. In order to be able to download newer versions, you have to renew your subscription. Please refer to this page for additional details.

    Regards,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  28. Hilda Kenny
    Hilda Kenny avatar
    43 posts
    Member since:
    Jul 2009

    Posted 18 Apr 2011 Link to this post

    I am not looking for a new version, I am looking for the version that I purchased to be fixed. I am not interested in new features; I just want the features that I paid for to work. I do not think that this is an unreasonable request. Why should I have to pay more to get items fixed?

     

  29. Nikolay
    Admin
    Nikolay avatar
    1803 posts

    Posted 18 Apr 2011 Link to this post

    Hi Hilda,

    The version that you are able to download (v2010.2.10.914) actually should address the LoadLayout issues that you have described before. If you are still experiencing the same issues, this probably means that we have missed a case in which the issue occurs. If this is so, please open a new support ticket and send us a sample project where the issue occurs. This will allow us to investigate your case in detail and provide you with a solution.

    Best wishes,
    Nikolay
    the Telerik team
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
  30. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 18 Apr 2011 Link to this post

    Hilda,

    While I think it's OK for Telerik to charge for ongoing support and bugfix releases, I second your opinion that we need bug fix releases apart from new feature releases. The current policy of forcing new feature releases on us to get bugfixes for old problems leads to too much instability for our clients.
    Bugfix Releases also should maintain a compatible API, installing a bug-fix version should be straight forward and not force any change in the calling applicaion.

    Regards
    Erwin
  31. erwin
    erwin avatar
    358 posts
    Member since:
    Dec 2006

    Posted 18 Apr 2011 Link to this post


Back to Top
UI for WinForms is Visual Studio 2017 Ready