This is a migrated thread and some comments may be shown as answers.

Reload the parent page data list

3 Answers 100 Views
Window
This is a migrated thread and some comments may be shown as answers.
Rahul
Top achievements
Rank 1
Rahul asked on 05 Jun 2009, 11:32 AM
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

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 05 Jun 2009, 11:45 AM
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.
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:
 
<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.
Tags
Window
Asked by
Rahul
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Rahul
Top achievements
Rank 1
Princy
Top achievements
Rank 2
Share this question
or