Rank: Newbie Groups: Member
Joined: 12/5/2007 Posts: 1
|
When using Dialog inside a Web User control, AnchorElementID property setting seems to be ignored. Dialog always pops up in the middle of the screen. Is there a way around it?
Also, is there a way to set Dialog position dynamically relative to mouse pointer or a control?
|
Rank: Administration Groups: Administration
Joined: 5/27/2007 Posts: 24,194
|
Hi,
You need to use the full client ID as AnchorElementID. For example, if your user control's ID is "UserControl1", and your anchor element has an ID of "Label1", the full AnchorElementID should be "UserControl1_Label1" --- you can get this name directly from the anchor control's ClientID property. Microsoft may change the way ASP.NET concatenates the names, so you may want to set it by code.
You can set it relative to a control by using AnchorElementID, OffsetX and OffsetY together. There is no direct support to set the dialog position relative to mouse pointer. However, if you already have the code to get the mouse position, you can move the anchor element according to your mouse position before displaying the dialog, that way it will practically position the dialog according to the mouse position.
Thanks
|
Rank: Advanced Member Groups: Member
Joined: 11/12/2008 Posts: 42
|
Can I use an context menu as anchor??? I'm setting this way:
Code: HTML/ASPX
<eo:Dialog ID="dlgLegOcor" runat="server" BackColor="White"
HeaderHtml="OcorrĂȘncias" CloseButtonUrl="00020312"
Height="176px" Width="112px" IsModal="False"
AnchorElementID="<%=cmMenu.ClientID %>"
ConfineElementID="<%=grAcomp.ClientID%>">
and calling this way:
Code: JavaScript
eo_GetObject('dlgLegOcor').show(false)
But it's not confined inside the grid neither showing closed tot he Context Menu...
|