Hi,
I have a problem with ItemClick event of WebDataMenu. When I click on the item menu, the event is raised on server-side. That is correct. After clicking my menu item, if I click a button on the same page the click event of the button is not raised and the ItemClick is raised instead. From the moment I click my menu item, if I click my button after that, it will always fire the ItemClick event and not the ButtonClick event... Can anyone help me with this issue? Thanks. Here's my code:
I have this webDataMenu and this button on my aspx page:
<ig:WebDataMenu runat="server" ID="ContextMenu" IsContextMenu="false" BorderStyle="Solid" BorderWidth="1" BorderColor="#CCCCCC" >
<AutoPostBackFlags ItemClick="On" />
<Items>
<ig:DataMenuItem Text="Exportar" Key="export" ImageUrl="../images/excel.png" />
</Items>
</ig:WebDataMenu>
<
igtxt:WebImageButton ID="WebImageButton1" runat="server" Text="exportar">
And then I have both events on server-side:
Private Sub ContextMenu_ItemClick(ByVal sender As Object, ByVal e As Infragistics.Web.UI.NavigationControls.DataMenuItemEventArgs) Handles ContextMenu.ItemClick
WebExcelExporter1.DataExportMode = DataExportMode.AllDataInDataSource
Dim excelFormat As Infragistics.Excel.WorkbookFormat = Infragistics.Excel.WorkbookFormat.Excel97To2003
Dim wBook As Infragistics.Excel.Workbook = New Infragistics.Excel.Workbook(excelFormat)
WebExcelExporter1.Export(wBook, 0, 0, WebDataGrid1)
End Sub
Private Sub WeImageButton1_ItemClick(ByVal sender As Object, ByVal e As Infragistics.WebUI.WebDataInput.ButtonEventsEventArgs) Handles WeImageButton1.Click
...
Hi soniaalves,
Are you sure you are using last version of our controls? I did the following reproduce:
<ig:WebDataMenu ID="WebDataMenu1" runat="server" OnItemClick="WebDataMenu1_ItemClick">
<ig:DataMenuItem Text="menu1">
</ig:DataMenuItem>
<ig:DataMenuItem Text="menu2">
<ig:WebScriptManager ID="WebScriptManager1" runat="server">
</ig:WebScriptManager>
<igtxt:WebImageButton ID="WebImageButton1" runat="server" OnClick="WebImageButton1_Click">
<Appearance>
<Image Url="./excel.png" />
</Appearance>
</igtxt:WebImageButton>
and in the code behind:
protected void WebImageButton1_Click(object sender, Infragistics.WebUI.WebDataInput.ButtonEventArgs e)
{
}
protected void WebDataMenu1_ItemClick(object sender, Infragistics.Web.UI.NavigationControls.DataMenuItemEventArgs e)
And when I debug, it hits the breakpoints with right events,
when I click Menu Item OnItemClick event is fired, when clicking Button, OnClick event is fired.
Do you have something else in the OnItemClick event handler, I mean something that changes the properties of the WebImageButton?