I am creating rad windows from an external XML datasource. But I cannot affect the positioning or size. Below is my ASPX
Below is my C#
Below is my XML Sample
Also, when you click on the window or drag the window, the elements drop down and to the left.
Any help would be great!
<
div
id
=
"dashboardContainer"
>
<
div
id
=
"dbTitle"
>
<
span
>DSX Web Data Center</
span
>
<
div
id
=
"dbMenu"
>
<
ul
id
=
"dbMenuItems"
>
<
li
>Open Workspace</
li
>
<
li
>Create Workspace</
li
>
<
li
>Most Recent Workspace</
li
>
</
ul
>
</
div
>
</
div
>
<
div
id
=
"dbPanelContainer"
runat
=
"server"
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
runat
=
"server"
></
telerik:RadWindowManager
>
</
div
>
<
div
id
=
"dbDSXLogo"
></
div
>
</
div
>
Below is my C#
private
void
LoadDBPanels()
{
//Get Panel Information
string
xmlFile =
"http://localhost/test/dbPanelsXML.xml"
;
XmlTextReader reader =
new
XmlTextReader(xmlFile);
// Loop over the XML file
while
(reader.Read())
{
// Here we check the type of the node, in this case we are looking for element
if
(reader.NodeType == XmlNodeType.Element)
{
// If the element is "profile"
if
(reader.Name ==
"panel"
)
{
//Create panel
RadWindow panel =
new
RadWindow();
panel.OffsetElementID=
"dbPanelContainer"
;
panel.VisibleOnPageLoad =
true
;
panel.Width =
new
System.Web.UI.WebControls.Unit(reader.GetAttribute(
"PanelWidth"
));
panel.Height =
new
System.Web.UI.WebControls.Unit(reader.GetAttribute(
"PanelHeight"
));
panel.Title = reader.GetAttribute(
"PanelTitle"
);
panel.ID = reader.GetAttribute(
"PanelID"
);
panel.Top =
new
System.Web.UI.WebControls.Unit(reader.GetAttribute(
"PanelTop"
));
panel.Left =
new
System.Web.UI.WebControls.Unit(reader.GetAttribute(
"PanelLeft"
));
panel.VisibleStatusbar =
false
;
panel.RestrictionZoneID =
"dbPanelContainer"
;
panel.NavigateUrl =
"http://www.deslongchamps.me"
;
RadWindowManager1.Windows.Add(panel);
}
}
}
//end while
}
Below is my XML Sample
<?
xml
version
=
"1.0"
encoding
=
"utf-8"
?>
<
panels
>
<
panel
>
<
PanelID
>DBPanel1</
PanelID
>
<
PanelTitle
>Panel 1</
PanelTitle
>
<
PanelWidth
>0</
PanelWidth
>
<
PanelHeight
>0</
PanelHeight
>
<
PanelTop
>0px</
PanelTop
>
<
PanelLeft
>0px</
PanelLeft
>
<
PanelData
>1</
PanelData
>
<
PanelType
>1</
PanelType
>
</
panel
>
<
panel
>
<
PanelID
>DBPanel2</
PanelID
>
<
PanelTitle
>Panel 1</
PanelTitle
>
<
PanelWidth
>400</
PanelWidth
>
<
PanelHeight
>1700</
PanelHeight
>
<
PanelTop
>0</
PanelTop
>
<
PanelLeft
>410</
PanelLeft
>
<
PanelData
>1</
PanelData
>
<
PanelType
>1</
PanelType
>
</
panel
>
</
panels
>
Also, when you click on the window or drag the window, the elements drop down and to the left.
Any help would be great!