I have a problem,
i have an asp.net panel with scrolling. That panel control is built in layers, so the RadDockLayout is one of its layers. The RadDocks control which are added dynamicly to this layer must be relative to a specific point (Top and Left properties). If I remove the scrolling property of the panel then it is works fine, BUT, if I keep the scrolling property and scroll up, down, right or left then the raddock will stay in its postion and will refer to another point in the map (Please view the attached images).
aspx page:
<
td style="width:76%;" >
<asp:Panel ID="Panel2" Width="710px" style="margin-top:-18px;" BorderWidth="0" Height="390px" runat="server" >
<asp:Panel ID="bg" Height="410px" ScrollBars="Auto" runat="server" >
<asp:Image ID="CMapImage" runat="server" />
<asp:Label ID="Label1" runat="server" Visible="false" Text="Label"></asp:Label><br />
<asp:Label ID="Label2" runat="server" Visible="false" Text="Label"></asp:Label>
</asp:Panel>
<asp:Panel ID="LayerPanel1" runat="server">
<telerik:RadDockLayout ID="RadDockLayout1" runat="server">
</telerik:RadDockLayout>
</asp:Panel>
<asp:Panel ID="content" runat="server">
<table border="0" cellpadding="0" cellspacing="0" width="100%">
<tr>
<td align="left" valign="middle">
<asp:Panel ID="CityNameOnTheMapPanel" style="margin-left:10px" runat="server">
<asp:Label ID="CityNameLabel" Font-Size="14pt" runat="server" ></asp:Label>
<asp:Label ID="OnTheMapLabel" runat="server" Font-Size="14pt" Font-Bold="true" Text="ON THE MAP"></asp:Label>
</asp:Panel>
</td>
<td align="right">
<asp:Label ID="excuteWindowOpenInFullScreen" runat="server" Visible="false"></asp:Label>
<asp:ImageButton ID="ImageButton1"
ImageUrl="~/Common/Img/Buttons/FullScreen.jpg" runat="server"
OnClientClick="UseRadWindow();return false;" />
<asp:ImageButton ID="ImageButton2" Visible="false" ImageUrl="~/Common/Img/Buttons/Print.jpg"
runat="server" />
</td>
</tr>
</table>
</asp:Panel>
</asp:Panel>
</td>
c# code:
private
RadDock CreateRadDock(string dockNum, string bsnsName, string website, int top, int left, string colr)
{
int docksCount = CurrentDockStates.Count;
RadDock dock = new RadDock();
dock.ID =
string.Format("RadDock{0}", dockNum);
dock.Title =
string.Format("Dock {0}", dockNum);
dock.Width =
Unit.Pixel(180);
dock.EnableEmbeddedSkins =
false;
dock.Left =
Unit.Pixel(left);
dock.Top =
Unit.Pixel(top);
dock.BackColor.GetBrightness();
dock.OnClientInitialize =
"SetHandleDock";
dock.DockMode =
DockMode.Docked;
dock.DockHandle =
DockHandle.Grip;
dock.Text =
"<table border='0' cellpadding='0' cellspacing='0' width='100%'><tr><td style='background-color:#" + colr + "; border-bottom-style:solid; border-left-style:solid; border-right-style:solid; border-top-style:solid; border-bottom-width:thin; border-top-width:thin; border-right-width:thin; border-left-width:thin;'><div style='margin:2px;'" + string.Format("<a href='{0}'>{1}</a> ", website, bsnsName) + "</div></td><td> </td></tr><tr><td> </td><td><img alt='' src='Common/Img/Lines/000000.gif' /></td></tr></table>";
dock.UniqueName =
Guid.NewGuid().ToString();
return dock;
}
protected
void CommonCheckBox_CheckedChanged(object sender, EventArgs e)
{
string _iDs = string.Empty;
DataLstObjctGetData _dataLstObjctGetData = new DataLstObjctGetData();
DataSet _myDataSet = new DataSet();
_myDataSet = _dataLstObjctGetData.GetHotSpots(GetCtgryLst(), City, SmallMapPosition);
DataTable _myDataTable = new DataTable();
_myDataTable = _myDataSet.Tables[0];
Session[
"HotSpotsDataTable"] = _myDataTable;
GridView1.DataSource = _myDataTable;
GridView1.DataBind();
RadDockLayout1.Controls.Clear();
foreach (DataRow _row in _myDataTable.Rows)
{
RadDock dock = CreateRadDock(_row["HSHotSpotID"].ToString(), _row["BBsnsName"].ToString(), _row["BBsnsWebsite"].ToString(), Convert.ToInt32(_row["HSYCord"]), Convert.ToInt32(_row["HSXCord"]), _row["CCtgryColr"].ToString());
RadDockLayout1.Controls.Add(dock);
if (_iDs.ToString().Equals(string.Empty))
{
_iDs += _row[
"HSHotSpotID"].ToString();
}
else
{
_iDs +=
"," + _row["HSHotSpotID"].ToString();
}
}
Label1.Text = _iDs.ToString();
}
Please, I need your help to make my raddock refers to the same point even if I scroll.
It is apprecited to send me the modified code.
Regards,
Bader