Problems with DirectEvents

  1. #1

    Problems with DirectEvents

    Hi, I am making an ajax call to a method of server from my aspx page. In the server method is called correctly, but does not update the values ​​of other controls such as control "txtTest. " This update is performed on the server method.

    To use the DirectEvents ajax call in the button's Click event

    As I can solve this problem?

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Test02.aspx.cs" Inherits="Devesof.Erp.Web.UI.Modules.Test02" %>
    
    <%@ Register Assembly="Ext.Net" Namespace="Ext.Net" TagPrefix="ext" %>
    
    <!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>
        <ext:ResourceManager ID="ResourceManager1" runat="server">
        </ext:ResourceManager>
        <form id="form1" runat="server">
        <asp:TextBox ID="txtTest" runat="server" Text=""></asp:TextBox>
            <br />
            <ext:Button ID="btnTest" runat="server" Text="Click me" >
                <DirectEvents AutoDataBind="true">
                    <Click OnEvent="btnTest_Click">
                        <EventMask MinDelay="500" ShowMask="true" Msg="Processing ..." />
                    </Click>
                </DirectEvents>
            </ext:Button>
        </form>
    </body>
    </html>

     protected void Page_Load(object sender, EventArgs e)
            {
    
            }
    
            protected void btnTest_Click(object sender, DirectEventArgs e)
            {
                txtTest.Text = "Method Ok!!!";
            }
    Thanks
    FAFNER!!!
  2. #2
    Hi,

    Only Ext.Net controls support updating properties on the client side.

    For none Ext.Net controls you have to call Update method.
    txtTest.Update();
    Please note that it completely rerender the widget.
    Why do you use asp:TextBox instead ext:TextField?
  3. #3
    Thanks, it worked to perfection

    FAFNER

Similar Threads

  1. DirectEvents get queued.
    By jorge2esteban in forum 1.x Help
    Replies: 4
    Last Post: Oct 25, 2011, 1:54 PM
  2. Help with GridPanel DirectEvents
    By sleong in forum 1.x Help
    Replies: 0
    Last Post: Sep 29, 2011, 6:39 PM
  3. All DirectEvents Is Error?
    By nanlinfeixue in forum 1.x Help
    Replies: 12
    Last Post: Jun 19, 2011, 9:34 AM
  4. Dynamic DirectEvents
    By Dominik in forum 1.x Help
    Replies: 3
    Last Post: Jul 30, 2010, 12:58 PM
  5. DirectEvents are not available at all for any control
    By lordofthexings in forum 1.x Help
    Replies: 3
    Last Post: May 19, 2010, 4:47 PM

Tags for this Thread

Posting Permissions