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

Calling SaveLayout on the RadDocking control some time produces malformed XML

8 Answers 227 Views
Docking
This is a migrated thread and some comments may be shown as answers.
David
Top achievements
Rank 1
David asked on 01 Jul 2011, 06:56 PM
I wrote a method to save the used layout every time the layout changes.  I found that if I doc one RadPanel to a "full area" the SaveLayout command creates bad XML.

Here is an example XML   -- this is not well formed xmL

<?xml version="1.0" encoding="utf-8"?><RadDocking><SplitContainers><RadSplitContainer Dock="DockedLeft" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True"><Items><RadPaneGroup SelectedIndex="0"><Items><RadPane IsDockable="True" Title="Flight Grid" Header="Flight Grid" CanUserClose="False" /></Items></RadPaneGroup></Items></RadSplitContainer><RadSplitContainer Dock="DockedBottom" Height="180"><Items><RadPaneGroup SelectedIndex="0"><Items><RadPane IsDockable="True" Title="Alerts and Notifications" Header="Alerts and Notifications" CanUserClose="False" CanUserPin="True" CanFloat="False" /></Items></RadPaneGroup></Items></RadSplitContainer></SplitContainers></RadDocking> Grid" CanUserClose="False" /></Items></RadPaneGroup></Items></RadSplitContainer></SplitContainers></RadDocking>

8 Answers, 1 is accepted

Sort by
0
bg
Top achievements
Rank 1
answered on 05 Jul 2011, 03:17 PM
I'm having the same issue after calling savelayout if I save a pane that is floating and its isHidden is true. This is a major problem for me since the next time the application loads (using RadDocking.LoadLayout) it can no longer find that pane unless the user clears their Isolated Storage. Attached is an example of the XML that is generated and malformed when saving a floating hidden pane.
0
David
Top achievements
Rank 1
answered on 05 Jul 2011, 04:18 PM
After looking at it for awhile,  I looks like the xml is ok,  it just looks like some old buffered xml data is not being cleared out so there is bad xml showing up after the closing tag.  If you can parse the xml line by line until you find the closing tag and then trough away the reset then it looks like this may be a workaround. 
0
bg
Top achievements
Rank 1
answered on 05 Jul 2011, 04:52 PM
Thats not the case for me, the XML is missing the RadSplitContainer "FloatingDockable"
This is an auto generated container created by Telerik to host the floating panes in. If ishidden is true for the RadPane it host and a save layout is called the XML becomes malformed and breaks the pane on the next application load when LoadLayout is called.

This:
<RadSplitContainer InitialPosition="FloatingDockable" FloatingWidth="220" FloatingHeight="300" FloatingX="1436" FloatingY="2" IsInOpenWindow="True" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True">
  <Items>
    <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="0">
      <Items>
        <RadPane SerializationTag="Properties" IsHidden="False" IsDockable="True" Title="Properties" Header="Properties" CanUserClose="True" CanUserPin="True" CanFloat="True" />
      </Items>
    </RadPaneGroup>
  </Items>
</RadSplitContainer>

Turns into This:
</RadDocking>ion="FloatingOnly" FloatingWidth="220" FloatingHeight="300" FloatingX="1380" FloatingY="73" IsInOpenWindow="False" RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True"><Items>
  <RadPaneGroup RelativeWidth="100" RelativeHeight="100" IsAutoGenerated="True" SelectedIndex="-1">
    <Items>
      <RadPane SerializationTag="Properties" IsHidden="True" IsDockable="True" Title="Properties" Header="Properties" CanUserClose="True" CanUserPin="True" CanFloat="True" />
    </Items>
  </RadPaneGroup>
</Items></RadSplitContainer></SplitContainers></RadDocking>litContainer></SplitContainers></RadDocking>
0
George
Telerik team
answered on 07 Jul 2011, 05:47 PM
Hello David and Brett,

Please accept my apologies for the late reply.

I just replied to the Brett's support ticket and I will paste the answer here as well, because it seems you both have one and same issue with RadDocking control:

We took some time to investigate this issue and we believe that saving the layout on these events could cause breaking the xml, because changing the RadDocking layout is not completed.

Anyway, we will continue investigating the problem and trying to reproduce it on our side. If you could send us a sample project that reproduces the issue, it would be of great help.


Kind regards,
George
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

0
Siew Fai Hoy
Top achievements
Rank 1
answered on 24 Aug 2011, 12:25 PM
Hi,

Do you have the solution to this problem?  I had a similar issue with my Out-of-browser application and I resorted to only save when the application exits, which works for my case.  Nevertheless I would be interested in seeing the some actual solution to this problem,

Regards,
Siew Fai
0
Ivo
Telerik team
answered on 29 Aug 2011, 01:40 PM
Hi,

There was a fix for the Saving/Loading mechanism recently. Could you, please try your application with the latest internal build (2011.2.823) and post the result here? 

Best wishes,
Ivo
the Telerik team

Thank you for being the most amazing .NET community! Your unfailing support is what helps us charge forward! We'd appreciate your vote for Telerik in this year's DevProConnections Awards. We are competing in mind-blowing 20 categories and every vote counts! VOTE for Telerik NOW >>

0
David
Top achievements
Rank 1
answered on 01 Sep 2011, 09:36 PM
In my rad doc panel I did not have a RadDocking.DocumentHost section and we added it and download the latest hotfixs ("v2011_2_0808_1040").  We added it and now the save seams to be working.   I'm not sure if that has anything do with anything but I looks  save is work for us now.
0
Siew Fai Hoy
Top achievements
Rank 1
answered on 08 Sep 2011, 08:05 AM
Hi,

I suspect that my issues are different, I have opened a support ticket regarding my issue.

Thanks,
Siew Fai Hoy
Tags
Docking
Asked by
David
Top achievements
Rank 1
Answers by
bg
Top achievements
Rank 1
David
Top achievements
Rank 1
George
Telerik team
Siew Fai Hoy
Top achievements
Rank 1
Ivo
Telerik team
Share this question
or