i hape one page on that page Add button when i click add button open the addpage in Radwindow. After adding data when i click Cancel or Close Radwindow option the parent page all controls are reload .............................
means referest datalist on parent page
how to do this ?
Thanks Regards
Rahul
means referest datalist on parent page
how to do this ?
Thanks Regards
Rahul
3 Answers, 1 is accepted
0
Hello rahul,
If you want to reload the parent page you can hook up the OnClientClose event of RadWindow and reload the page through javascript. In case you do not need to reload the whole page, you can rebind the list by using ajax as shown in the following online demo:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid
Regards,
Svetlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
If you want to reload the parent page you can hook up the OnClientClose event of RadWindow and reload the page through javascript. In case you do not need to reload the whole page, you can rebind the list by using ajax as shown in the following online demo:
http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid
Regards,
Svetlina
the Telerik team
Instantly find answers to your questions on the new Telerik Support Portal.
Check out the tips for optimizing your support resource searches.
0
Rahul
Top achievements
Rank 1
answered on 05 Jun 2009, 12:51 PM
no not work i want refresh the DDL control of asp.net when i close the Radwindow
???
???
0
Princy
Top achievements
Rank 2
answered on 08 Jun 2009, 10:28 AM
Hi Rahul,
Here is the code that I tried for rebinding the DDL on after clossing the radwindow. Hope this helps.
ASPX:
CS:
JavaScript:
-Princy.
Here is the code that I tried for rebinding the DDL on after clossing the radwindow. Hope this helps.
ASPX:
<telerik:RadWindowManager ID="RadWindowManager1" runat="server"> |
<Windows> |
<telerik:RadWindow runat="server" InitialBehavior="None" OnClientClose="OnClientClose" |
NavigateUrl="Window.aspx" Left="" Behavior="Default" OpenerElementID="Button1"> |
</telerik:RadWindow> |
</Windows> |
</telerik:RadWindowManager> |
<asp:DropDownList ID="DropDownList1" runat="server"> |
<asp:ListItem Text="Item1"></asp:ListItem> |
<asp:ListItem Text="Item2"></asp:ListItem> |
</asp:DropDownList> |
<asp:Button ID="Button1" runat="server" Text="Open window" /> |
<telerik:RadAjaxManager ID="RadAjaxManager1" runat="server" OnAjaxRequest="RadAjaxManager1_AjaxRequest"> |
<AjaxSettings> |
<telerik:AjaxSetting AjaxControlID="RadAjaxManager1"> |
<UpdatedControls> |
<telerik:AjaxUpdatedControl ControlID="DropDownList1" /> |
</UpdatedControls> |
</telerik:AjaxSetting> |
</AjaxSettings> |
</telerik:RadAjaxManager> |
CS:
protected void RadAjaxManager1_AjaxRequest(object sender, Telerik.Web.UI.AjaxRequestEventArgs e) |
{ |
if (e.Argument == "Rebind") |
{ |
// Rebind the DDL |
DropDownList1.Items.Add("New item"); |
DropDownList1.DataBind(); |
} |
} |
JavaScript:
<script type="text/javascript"> |
function OnClientClose() |
{ |
$find("<%=RadAjaxManager1.ClientID%>").ajaxRequest('Rebind'); |
} |
</script> |
-Princy.