[CLOSED] Update ASP Update Panel with Direct Event

  1. #1

    [CLOSED] Update ASP Update Panel with Direct Event

    hi,
    how can I update ASP Update panel with Direct event. I place small sample it shows how I want to update. In my real Sample I on Direct even I want to Update Gridview inside Update Panel.

      
    
    protected void SAPButton_Click(object sender, DirectEventArgs e)</p>
    
    {</p>
    
    time.Text = System.DateTime.Now.ToString();</p>
    
    UpdatePanel1.Update();</p>
    
    }</p>
    
    </script></p>
    
    <html xmlns="http://www.w3.org/1999/xhtml"></p>
    
    <head id="Head1" runat="server"></p>
    
    <title>GridPanel with EditableGrid Plugin - Ext.NET Examples</title></p>
    
    </p>
    
    </head></p>
    
    <body></p>
    
    <form id="Form1" runat="server"></p>
    
    <ext:ResourceManager ID="ResourceManager1" runat="server" /></p>
    
    <asp:ScriptManager ID="script1" runat="server" EnablePartialRendering="true" /></p>
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional"></p>
    
    <ContentTemplate></p>
    
    </p>
    
    <asp:Label ID="time" runat="server" /></p>
    
    </ContentTemplate></p>
    
    </asp:UpdatePanel></p>
    
    <ext:Button runat="server" ID="test" Text="Run"></p>
    
    <DirectEvents></p>
    
    <Click OnEvent="SAPButton_Click" /></p>
    
    </DirectEvents></p>
    
    </ext:Button></p>
    
    </form> </p>
    
    </body></p>
    
    </html></p>
  2. #2

    RE: [CLOSED] Update ASP Update Panel with Direct Event

    I got it working
    thanks
  3. #3

    RE: [CLOSED] Update ASP Update Panel with Direct Event

    sharif (6/23/2010) I got it working
    thanks
    Please post an update detailing what change was required. Your update may help someone in the future.


    Glad to hear you have the problem solved.


    Geoffrey McGill
    Founder
  4. #4

    RE: [CLOSED] Update ASP Update Panel with Direct Event



    It is work around the issue


    I placed the button inside asp update panel and used onclick command and set the AutoPostBack to true. I used EventArg on the code behing. when the user click Search it will
    Get the data from the database and run Upatepanel2.Update()
    
    
    <ext:Panel ID="Panel1" runat="server" ColumnWidth=".1" Layout="Form" Border="false" >
    
    
    <Content>
    
    
    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
    
    
    <ContentTemplate>
    
    
    <ext:Button ID="Button1" runat="server" Icon="Magnifier" Text="Search" AutoPostBack="true" OnClick="GetEmployeeList">
    
    
    
    
    
    </ext:Button>
    
    
    </ContentTemplate>
    
    
    
    </asp:UpdatePanel>
    
    
    
    
    
    </Content>
    
    
    
    
    
    </ext:Panel>
    
    
    
    
    
    
     
    
    
    <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
    
    
    <ContentTemplate>
    
    
    
    
    
    <asp:Label ID="time" runat="server" />
    
    
    <asp:GridView ID="GrEmployeeList" runat="server" Width="735" AutoGenerateColumns="false" >
    
    
    <Columns>
    
    
    
    
    
    <asp:BoundField HeaderText="Employee ID" DataField="employeeID" />
    
    
    <asp:BoundField HeaderText="Employee Name" DataField="employeeName" />
    
    
    <asp:BoundField HeaderText="HRM Name" DataField="HrmName" />
    
    
    <asp:BoundField HeaderText="Country" DataField="countryName" />
    
    
    
    
    
    </Columns>
    
    
    </asp:GridView>
    
    
    </ContentTemplate>
    
    
    </asp:UpdatePanel>
    
    
    
    
     
    
    
    protected void GetEmployeeList(object sender, EventArgs e)
    
    
    {
    
    
    protected void GetEmployeeList(object sender, EventArgs e)
    
    
    {
    
    
    GrEmployeeList.DataSource = ManageRating.Get_performance_rating(Convert.ToInt32
    
    
     
    
    
    GrEmployeeList.DataSource = ManageRating.Get_performance_rating(Convert.ToInt32(cmbManager.SelectedItem.Value));
    
    
    
    
    GrEmployeeList.DataBind();
    
    
    UpdatePanel1.Update();
    
    
     
    
    
    
    
    
    }
    
    
    
    
    
    }

Similar Threads

  1. [CLOSED] How to show mask on ajax update panel update
    By egvt in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: May 18, 2012, 9:36 PM
  2. Replies: 29
    Last Post: Feb 01, 2012, 4:58 PM
  3. [CLOSED] Update displayfield on directevents, update its size
    By SouthDeveloper in forum 1.x Legacy Premium Help
    Replies: 2
    Last Post: Nov 16, 2011, 9:57 PM
  4. Update ASP.net controls via Direct Method
    By glenh in forum 1.x Help
    Replies: 4
    Last Post: Sep 14, 2010, 5:38 PM
  5. [CLOSED] Update a nodes iconcls and cls properties in direct method.
    By Labyrinth in forum 1.x Legacy Premium Help
    Replies: 1
    Last Post: Jul 02, 2010, 1:29 PM

Posting Permissions