I´m attaching a double-click client-side event on an dynamically created gauge. At first time works ok but after a callback on the update panel where the gauge is, there is no more client-side doble-click.
Any idea?
the following code worked for me. clicking the button inside the refreshpanel caused an async postback, and the gauge doubleclick handler was still intact. is this what you're trying to do?
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %><%@ Register assembly="Infragistics2.WebUI.Misc.v8.3, Version=8.3.20083.2028, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.WebUI.Misc" tagprefix="igmisc" %><!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head runat="server"> <title></title></head><body> <form id="form1" runat="server"> <div> <igmisc:WebAsyncRefreshPanel ID="WebAsyncRefreshPanel1" runat="server" Height="20px" Width="80px"> <asp:Button ID="Button1" runat="server" Text="Button" /> </igmisc:WebAsyncRefreshPanel> </div> </form></body></html>
protected void Page_Load(object sender, EventArgs e) { if (!this.IsPostBack) { this.Page.ClientScript.RegisterClientScriptBlock(this.GetType(), "gaugeDblClick", "<script type='text/javascript'>function test() { alert('hello'); }</script>"); } UltraGauge ultraGauge1 = new UltraGauge(); ultraGauge1.ID = "ultraGauge1"; ultraGauge1.ClientSideEvents.DblClick = "test"; ultraGauge1.BackColor = Color.PaleGreen; this.WebAsyncRefreshPanel1.Controls.Add(ultraGauge1); }
but i'm using an UpdatePanel from the Microsoft ajax control toolkit, not the infragistics WebAsyncRefreshPanel. In the sample code you find below, there are two buttons, "My Test" is the button in the UpdatePanel and "Button" the button in the WebAsyncRefreshPanel. You wil see that once you click "My Test" there is no more double click.
Sample:
sorry, I should write ASP.NET AJAX Control Toolkit, not Microsoft ajax control toolkit
it hasn't been fixed yet. the problem is actually in some shared ASP.NET code, and is currently entered as a WebAsyncRefreshPanel bug. since my specialty is only charting, I forwarded your question to Infragistics Developer Support. they will look into the details of this issue and contact you about it.
Has the fix for this problem been developed yet? I am experiencing this bug with my current project.
sorry, but i don't know of a workaround for this problem.
I'm using infragistic and not infragistics controls, not a few, for it and the time i will spend testing all, I cannot switch now.
Any workaround?
i was able to reproduce this behavior, so i entered it into our bug tracking system (# 12312). it should be fixed in a future hotfix release. feel free to contact infragistics developer support at http://infragistics.com/gethelp to inquire about the status of this bug report.
in the meantime, you might want to switch to the WebAsyncRefreshPanel since that one seems to work OK.