[SOLVED] Update ASP Update Panel with Direct Event
New Community Forums available at http://forums.ext.net
 

Coolite Forums

Welcome Guest ( Login | Register )
 
[SOLVED] Update ASP Update Panel with Direct...
Subscribe
Last Login: 7/5/2010 12:55:22 PM
Posts: 108,
Posted 6/23/2010 2:52:33 PM

Group: Coolite Premium Member & Early Adopter
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)

{

time.Text = System.DateTime.Now.ToString();

UpdatePanel1.Update();

}

</script>

<html xmlns="http://www.w3.org/1999/xhtml">

<head id="Head1" runat="server">

<title>GridPanel with EditableGrid Plugin - Ext.NET Examples</title>

</head>

<body>

<form id="Form1" runat="server">

<ext:ResourceManager ID="ResourceManager1" runat="server" />

<asp:ScriptManager ID="script1" runat="server" EnablePartialRendering="true" />

<asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">

<ContentTemplate>

<asp:Label ID="time" runat="server" />

</ContentTemplate>

</asp:UpdatePanel>

<ext:Button runat="server" ID="test" Text="Run">

<DirectEvents>

<Click OnEvent="SAPButton_Click" />

</DirectEvents>

</ext:Button>

</form>

</body>

</html>


Last Login: 7/5/2010 12:55:22 PM
Posts: 108,
Posted 6/23/2010 3:35:51 PM

Group: Coolite Premium Member & Early Adopter
 I got it working
thanks
Last Login: 7/8/2010 1:50:34 AM
Posts: 4,722,
Posted 6/23/2010 3:37:45 PM

Group: Core Development Team
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
Coolite Inc.
Development Team
Skype : geoffrey.mcgill
Forum Guidelines | Coolite Examples | Coolite API Docs | ExtJS API Docs | Twitter
Last Login: 7/5/2010 12:55:22 PM
Posts: 108,
Posted 6/23/2010 8:48:52 PM

Group: Coolite Premium Member & Early Adopter

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();


 



}



}



« Prev Topic | Next Topic »
Reading This Topic
Active Users: 0 ( 0 guests, 0 members, 0 anonymous members )
No members currently viewing this topic.
All times are GMT -5:00, Time now is 1:50pm