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

Deserialization issue

8 Answers 196 Views
Dock
This is a migrated thread and some comments may be shown as answers.
Veljko Janjic
Top achievements
Rank 1
Veljko Janjic asked on 14 Mar 2007, 04:29 PM
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.

8 Answers, 1 is accepted

Sort by
0
Veljko Janjic
Top achievements
Rank 1
answered on 14 Mar 2007, 04:43 PM
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.
0
Julian Benkov
Telerik team
answered on 15 Mar 2007, 12:43 PM
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
0
Vincent
Top achievements
Rank 1
answered on 03 Apr 2007, 10:36 AM

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
0
Julian Benkov
Telerik team
answered on 03 Apr 2007, 02:44 PM
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
0
Vincent
Top achievements
Rank 1
answered on 03 Apr 2007, 04:02 PM

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

0
Julian Benkov
Telerik team
answered on 04 Apr 2007, 11:35 AM
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
0
kortm
Top achievements
Rank 1
answered on 05 Apr 2007, 12:24 PM
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
0
Julian Benkov
Telerik team
answered on 05 Apr 2007, 04:20 PM
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
Tags
Dock
Asked by
Veljko Janjic
Top achievements
Rank 1
Answers by
Veljko Janjic
Top achievements
Rank 1
Julian Benkov
Telerik team
Vincent
Top achievements
Rank 1
kortm
Top achievements
Rank 1
Share this question
or