Hi,
I am using the WebDataMenu (IG v10.3.20103.2073). I bind it to a list of objects that I dynamically create and it properly generates the menu in my web page.
I've enabled the ItemClick event and when it fires I want to replace the ImageUrl value for the selected item to indicate that the menu item has been selected (and replace the ImageUrl of some other menu items to indicate that they are not selected anymore). So, to do this I re-generate the list of objects with the updates value for the ImageUrl and Databind it to the webdatamenu again.
Now, even though the values have been properly updated, you don't see this change reflected in the WebDataMenu after the async postback has finished. It does work fine though if I use the full auto postback option in the AutoPostBackFlags.
See the WebDataMenu code here:
<ig:WebDataMenu ID="WebDataMenu1" runat="server" OnItemClick="WebDataMenu1_ItemClick" StyleSetName="Office2007Black">
<GroupSettings Orientation="Horizontal" Width="400px" Height="100%" />
<DataBindings>
<ig:DataMenuItemBinding DefaultText=" " TextField="Text" ValueField="Value" TargetField="_blank" ToolTipField="Text" ImageUrlField="ImageUrl" />
</DataBindings>
<AutoPostBackFlags ItemClick="Async" />
</ig:WebDataMenu>
....
// ItemClick event on server
protected void WebDataMenu1_ItemClick(object sender, DataMenuItemEventArgs e)
{
List<MyMenuItem> myMenuItemsList = ReGenerateMenuItems(e.Item.Value);
this.WebDataMenu1.DataSourceID = null;
this.WebDataMenu1.DataSource = new BindingList<MyMenuItem>(myMenuItemsList);
this.WebDataMenu1.DataBind();
}
Can anybody tell me how to get the changes that happened handling the ItemClick async postback event to be reflected in the WebDataMenu?
Thanks!
G.
Hi greale,
it will not working in a that way. When AutoPostBackFlags ItemClick is set to"Async" it will affect only the clicked node. It should be working when AutoPostBackFlags ItemClick is set to"On"