Jul 03, 2012, 6:32 AM
[CLOSED] [1.2] menu not rendered
hi,
i have problem rendering the menu, please help to inspect
i have problem rendering the menu, please help to inspect
<ext:Viewport ID="Viewport_SinglePatient" runat="server">
<Listeners>
<BeforeRender Handler="Ext.net.DirectMethods.LoadSingleViewData()" />
</Listeners>
<Items>
<ext:Panel ID="SingleResultHeader" runat="server" Height="60" MaxHeight="60" MinHeight="60" Padding="2">
<Items>
<ext:Button ID="btnCategoryMenu" runat="server" Text="REPORT ALL" Flat="true">
<Menu>
<ext:Menu ID="CategoryMenu" runat="server" ShowSeparator="false" Cls="extmenu">
<Items>
<ext:ComponentMenuItem ID="ComponentMenuItem_CategoryMenu" runat="server" Shift="false">
<Component>
<ext:Container ID="Container_CategoryMenu" runat="server" Height="128" Layout="HBox" HideMode="Offsets">
<LayoutConfig>
<ext:HBoxLayoutConfig Align="Stretch" />
</LayoutConfig>
</ext:Container>
</Component>
</ext:ComponentMenuItem>
</Items>
</ext:Menu>
</Menu>
</ext:Button>
</Items>
</ext:Panel>
</Items>
</ext:Viewport>
code behind [Ext.Net.DirectMethod(ShowMask = true, Msg = "Loading....")]
public void LoadSingleViewData()
{
try
{
bool isRender = true;
if (isRender)
{
this.Container_CategoryMenu.RemoveAll();
}
Ext.Net.MenuPanel grouppanel = new Ext.Net.MenuPanel();
grouppanel.FitHeight = true;
grouppanel.Width = 150; //175;
grouppanel.IDMode = Ext.Net.IDMode.Explicit;
grouppanel.ID = "grouppanel_single" + "_test";
grouppanel.SaveSelection = false;
grouppanel.Border = false;
Ext.Net.MenuItem item = new Ext.Net.MenuItem();
item.IDMode = Ext.Net.IDMode.Explicit;
item.ID = "menu_single" + "_test";
item.Text = "test root";
grouppanel.Menu.ShowSeparator = false;
grouppanel.Menu.Items.Add(item);
this.Container_CategoryMenu.Add(grouppanel);
grouppanel.Render();
Container_CategoryMenu.Height = 128;
Container_CategoryMenu.Width = 150 * 2;
}
catch (Exception ex)
{
}
}
Last edited by Daniil; Jul 06, 2012 at 10:48 AM.
Reason: [CLOSED]