Question

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. Please suggest your ideas. My code is as below:

<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

Was it helpful?

Solution 3

Thanks all for your suggestions.I have done that with the ajaxRequest.Anyone facing the same issue,please look in the below link http://www.telerik.com/community/forums/aspnet-ajax/window/refresh-radgrid-on-close-of-radwindow.aspx .

Please suggest me your ideas on the below issue with radwindow.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.

Thanks, Soumya

OTHER TIPS

onclientclose , use __doPostBack javascript function which is part of every asp.net page to reload your web page

 function OnClientClose(radWindow) { 
    __doPostBack(event_target, radWindow.argument); 
}

Use RadAjaxManager and it's client side events ajaxRequest or ajaxRequestWithTarget

here is example of it.

with this event you can rebind your dropdown without causing postback.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top