May 21, 2012, 7:02 AM
[CLOSED] Adding menu items to button group dynamically in a direct event..
Hi,
I'm trying to add menu items dynamically to button group, when user selects one of the item in a SelectBox. However, i do not see any menu item in the button group. Looks like, it is not getting rendered after adding items to the menu.
Here is the sample code, which i'm calling in direct event of SelectBox:
Thanks.
I'm trying to add menu items dynamically to button group, when user selects one of the item in a SelectBox. However, i do not see any menu item in the button group. Looks like, it is not getting rendered after adding items to the menu.
Here is the sample code, which i'm calling in direct event of SelectBox:
private void BindMenuItems()
{
for (int i = 0; i < 5; i++)
{
Ext.Net.MenuItem menuItem = new Ext.Net.MenuItem();
menuItem.ID = "item" + i.ToString();
menuItem.Text = "item " + i.ToString();
this.btnMenu.Items.Add(menuItem);
}
}
Appreciate, if you can suggest the right way to achieve this.Thanks.
Last edited by Daniil; May 21, 2012 at 9:45 AM.
Reason: [CLOSED]