Deserialization issue

9 posts, 0 answers
  1. Veljko Janjic
    Veljko Janjic avatar
    20 posts
    Member since:
    Nov 2005

    Posted 14 Mar 2007 Link to this post

    I have very complex application, so it is quite hard to isolate a problem.

    If I create layout in the runtime without using deserialization my app works just fine, some docks are filled with TreeGrid other with custom controls, grids, propertgrids etc... And they are all connected with various events.

    However, if I replace a line of code which creates layout with one which loads serialized content, all connections are broken between docks, treegrid doesn't load (I traced it, all nodes are created just like before, but in the end nothing is shown), grid doesn't load ,etc... Generally, it behaves very strange.

    I am using Forms derived from dockpanel as docks, they have onLoad and other default events also there are manually added events. They are declared as static in main form.

    The above information is maybe irrelevant, but it might help you figure out what is going on with my application.

    I used code similar to yours in example.


    Is there anything particular that I should pay attention to ?
    Does this sounds familiar to you?


    Thanks in advance.
  2. Veljko Janjic
    Veljko Janjic avatar
    20 posts
    Member since:
    Nov 2005

    Posted 14 Mar 2007 Link to this post

    I played a little more and found a simple example of what I was previously referring.

    In your example add a method similar to your CreatePanel, just add few lines of code which add treeview with some nodes. Then save dock state and close application. Next time you open the app and loadXML dock will be empty, without treeview.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 15 Mar 2007 Link to this post

    Hello Veljko,

    Our docking component currently supports full design time serialization. When you are using the docking manager in run time, it only serializes the dock layout and all IDockable windows, but will not serialize it's child content like treeviews, listviews, etc.

    The solution is to implement your custom logic after loading the docking layout in run-time.

    Thank you for your feedback. In our feature releases we will continue to simplify the serialization/deserialization issues of docking component.


    All the best,
    Julian Benkov
    the telerik team
  5. Vincent
    Vincent avatar
    3 posts
    Member since:
    Apr 2007

    Posted 03 Apr 2007 Link to this post


    Hello,

    As Veljko, I tried to serialize all controls inside the dock manager but I can not serialize panels’ child content like treeviews, listviews, etc.

    you said “The solution is to implement your custom logic after loading the docking layout in run-time.”
    I’m not familiar with XML, but I can’t see how to add the child controls to your loadXML file. Have I to parse the XML file and to add content in?

    Can you please give us an example?

    Thanks,
    Vincent
  6. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 03 Apr 2007 Link to this post

    Hi Vincent,

    The solution is to implement your custom logic after loading the docking layout in run-time by registering to the LayoutLoaded event of the docking manager, and then in the event handler populate the inner controls with your logic for initialization. This approach is shown in the following code snippet.

    void dockingManager1_LayoutLoaded(object sender, EventArgs e)  
    {  
        //populate treeview  
        this.treeView.Nodes.Add("Test node...");  
     
        //populate listview  
        if (treeView.SelectedNode != null)  
        {  
            listView.Items.Add("Item1");  
            listView.Items.Add("Item2");  
            listView.Items.Add("Item3");  
        }  

    I hope this helps. Let me know if you have other questions.

    Greetings,
    Julian Benkov
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  7. Vincent
    Vincent avatar
    3 posts
    Member since:
    Apr 2007

    Posted 03 Apr 2007 Link to this post

    Hello Julian,

    In our application, the controls can be added, removed or personalised “colour, disposition” at run time, so we have to notify the dock manager every time we perform a run time modification?

    Besides, the dock manager can be a child control. when we have tab strip for example, we will not save the tabs configuration.

    You think it’s impossible to use the XML file (generated by the dock manager) and to add into all the other controls with their last configurations.

    Thanks,
    Vincent

  8. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 04 Apr 2007 Link to this post

    Hi Vincent,

    When your application is in design mode, the CodeDom serialization saves the docking layout, properties, and states for all components hosted in the form. In runtime, the docking manager serialization only saves/loads the layout of the docking windows and cannot be used to save/load IDockable windows content.
     

    Best wishes,
    Julian Benkov
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
  9. kortm
    kortm avatar
    6 posts
    Member since:
    Feb 2007

    Posted 05 Apr 2007 Link to this post

    Hello,
     
    you said "In our feature releases we will continue to simplify the serialization/deserialization issues of docking component".

    I wonder if  serialization/deserialization functionalities will be included in the next release (23 April).

    today, our serialization logic is very limited in spite of its complexity.

    Regards
    kort
  10. Julian Benkov
    Admin
    Julian Benkov avatar
    1135 posts

    Posted 05 Apr 2007 Link to this post

    Hi kortm,

    In the upcoming release we will update the docking component, but major serialization enhancements will be present in future releases. We are too close to the current release deadline for such improvements.

    We are sorry for the inconvenience. We hope that you will like the new release once it comes out.


    Kind regards,
    Julian Benkov
    the telerik team

    Instantly find answers to your questions at the new telerik Support Center
Back to Top
UI for WinForms is Visual Studio 2017 Ready