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?
David, could you see something of this?
thank you
sorry, I should write ASP.NET AJAX Control Toolkit, not Microsoft ajax control toolkit
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:
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); }