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

Refresh parent page Onclientclose of Radwindow.

6 Answers 247 Views
Window
This is a migrated thread and some comments may be shown as answers.
Soumya
Top achievements
Rank 1
Soumya asked on 30 Jul 2012, 05:53 AM
I am trying to refresh the parent aspx page on 'OnClientClose' of Radwindow.
I have tried the below code.But it is reloading/refreshing the page and all the data entered in the parent page also gets refreshed.I need to retain all the values in the parent page and reflect all the changes done in radwindow.

<telerik:RadWindow ID="NationalityDialog" Title="Nationality Data" runat="server" Behaviors="Close" Height="550px" Width="450px"
                Left="150px" OnClientClose="NationClientClose" />

function NationClientClose(sender, args) {
                    window.location.reload();
//window.location.href = window.location.href; 
                }

Thanks,
Soumya

6 Answers, 1 is accepted

Sort by
0
Soumya
Top achievements
Rank 1
answered on 30 Jul 2012, 09:14 AM
any answer?
0
rdmptn
Top achievements
Rank 1
answered on 31 Jul 2012, 08:39 AM
Can you explain how you expect to both:
1) refresh the parent page
2) keep the old values in this page

These are two contradicting concepts and you should have a clear view of what you want to happen before someone can give you a logical suggestion. Nevertheless, this demo may be close to what you want to achieve - using AJAX instead of a full page reload.
0
Soumya
Top achievements
Rank 1
answered on 31 Jul 2012, 08:51 AM

I am having textbox ,combobox & button controls in an aspx page.To add a new value in the combobox,I am using a button.Onclick of this 
 Button ,a radwindow opens which add/update some records.On closing the radwindow,I need to reflect those records in the parent page combobox.
For this,I have used onclientclose property of radwindow  with "window.location.reload();".If the user has entered some data in other controls before clicking the radwindow button,then all data will be lost.I just need to reload the combobox on closing the radwindow.
Hope it is clear now.

thanks,
soumya
0
Soumya
Top achievements
Rank 1
answered on 01 Aug 2012, 05:59 AM
Issue got solved from the below link.
http://www.telerik.com/community/forums/aspnet-ajax/window/refresh-radgrid-on-close-of-radwindow.aspx 

One more issue I have with this radwindow as below:
Radwindow has a grid,on which user add/edit records.user may go to the 5th page and edit a record and and "Update successfull message is shown".Now the user close the radwindow and on again opening the radwindow,the message is still there and the Grid is on 5th page.How can I show the Radwindow with Grid on first page and no messages on opening radwindow.

Please help on this with a solution.
Thanks,
Soumya
0
Soumya
Top achievements
Rank 1
answered on 04 Aug 2012, 05:18 AM
Any Answer?
0
rdmptn
Top achievements
Rank 1
answered on 07 Aug 2012, 11:20 AM
Set its ReloadOnShow property to true, otherwise it caches the page you load in it because closing it only hides it via CSS. If you are using the ContentTemplate you can perform an AJAX request to refresh your values (see this article for AJAX).
Tags
Window
Asked by
Soumya
Top achievements
Rank 1
Answers by
Soumya
Top achievements
Rank 1
rdmptn
Top achievements
Rank 1
Share this question
or