Oct 23, 2012, 2:57 PM
[CLOSED] Force layout of Button's children
Hi folks, i would like to know whether it's possible to force the redering of button's menu. In the following example, the Menu's AfterRender event (line 12) is just fired when the button _btn is clicked.
To overcome this issue it's possible to call Menu's doAutoRender method (Please uncomment from line 16 to 18) after button's rendering, but i'm not sure that it's the best approach to accomplish my needs.
What you think about it?
Thanks in advance.
To overcome this issue it's possible to call Menu's doAutoRender method (Please uncomment from line 16 to 18) after button's rendering, but i'm not sure that it's the best approach to accomplish my needs.
What you think about it?
Thanks in advance.
<ext:Toolbar ID="Toolbar1" runat="server" Width="500">
<Items>
<ext:Button ID="_btn" runat="server" Text="Click Me" Icon="Application">
<Menu>
<ext:Menu ID="_mnl" runat="server">
<Items>
<ext:MenuItem Text="Menu 1" Icon="Accept" runat="server" />
<ext:MenuItem Text="Menu 1" Icon="Accept" runat="server" />
<ext:MenuItem Text="Menu 1" Icon="Accept" runat="server" />
</Items>
<Listeners>
<AfterRender Handler="alert('Menu was rendered');" />
</Listeners>
</ext:Menu>
</Menu>
<%--<Listeners>
<AfterRender Handler="item.menu.doAutoRender();" />
</Listeners>--%>
</ext:Button>
</Items>
</ext:Toolbar>
</body>
</html>
Last edited by Daniil; Nov 01, 2012 at 5:54 PM.
Reason: [CLOSED]