I have found very little information on rebinding data in an ASP.NET FormView control without doing a PostBack.
My Scenario is a button on a page with bound FormView data opens a RadWindow and a database edit is done. Optimally I'd like to have the underlying parent page rebind as soon as the RadWindow database update occurs.
However just to get going I am using RadWindow's OnClientClose to rebind the FormView:
All the above .aspx code works but where I am confused is the code behind. Below is my guess on what the code behind would be:
My Scenario is a button on a page with bound FormView data opens a RadWindow and a database edit is done. Optimally I'd like to have the underlying parent page rebind as soon as the RadWindow database update occurs.
However just to get going I am using RadWindow's OnClientClose to rebind the FormView:
<asp:formview id="FormView1" runat="server" enableviewstate="false">
<ItemTemplate>
<%# Eval("StreetAddress") %>
</ItemTemplate>
</asp:formview>
<telerik:RadWindow
ID="EditPermits"
runat="server"
Height="290px"
Width="220px"
Top="50px"
Left="700px"
ReloadOnShow="true"
ShowContentDuringLoad="false"
Modal="true"
OnClientClose="clientClose">
</telerik:RadWindow>
<script>
function clientClose() {
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest();
}
</script>
<telerik:RadAjaxManager
ID="RadAjaxManager1" runat="server"
OnAjaxRequest="RadAjaxManager1_AjaxRequest">
</telerik:RadAjaxManager>
All the above .aspx code works but where I am confused is the code behind. Below is my guess on what the code behind would be:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) { FormView1.DataBind(); }