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

RadWindow close, then refresh radGrid on parent page

3 Answers 332 Views
Window
This is a migrated thread and some comments may be shown as answers.
Amitkumar
Top achievements
Rank 1
Amitkumar asked on 03 Dec 2009, 01:31 PM
Hi All,

I am calling radwindow through parent.asxp page, within a that radwindow have one child.aspx page and that page have two tab i.e. One, and Two, within a One tab have a One.ascx user control, and Two tab has a Two.ascx user control. Two.ascx user control have one button, when i click on that buttton it should close radwindow as well as refresh radGrid1 available in parent page, without postback.

Please reply me.


Thanks & Regards,
Amit

3 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 08 Dec 2009, 09:24 AM
Hello amit,
 
I suggest to use a RadAjaxManager to perform an ajax request when the RadWindow is closed and to rebind the grid.

You can find a very detailed and similar demo below:

http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=window

Note, that when you install RadControls, our online examples projects are automatically installed on your computer and you can not only examine their full source code, but also extend them further in order to meet your requirements.

You can open the demos from here:

Start\Programs\Telerik\RadControls for ASPNET AJAX\Open Sample WebSite In VisualStudio

The actual location on your hard disk is the following one:

C:\Program Files\Telerik\RadControls for ASPNET AJAX \Live Demos

I hope that this information is helpful.


Kind regards,
Svetlina
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
0
Amitkumar
Top achievements
Rank 1
answered on 09 Dec 2009, 04:45 AM
Hello Admin,

Please read again the problem, i have radwindow with page and that page have an user control and when i click on button available in user control that timt I would like to refresh the parent page grid.


Thansk & Regards
Dharmesh
0
Georgi Tunev
Telerik team
answered on 09 Dec 2009, 06:41 AM
Hello Dharmesh,

The demo that Svetlina gave in her reply covers such scenario. The dialog page doesn't use user control, but you can use the same logic in your scenario.
Please check EditFormCS.aspx(.cs) and DefaultCS.aspx(.cs) files (click on the splitbuttons in the Example Source Code & Description field to examine the different files). For your convenience I will explain the logic of the demo below.
  1. In EditFormCS.aspx, when the Update button is clicked, it updates the database and then outputs a JavaScript function by using ClientScript.RegisterStartupScript(). 
  2. This function (CloseAndRebind()) closes the RadWindow and calls the refreshGrid() function on the parent page.
  3. On the parent page (DefaultCS.aspx), the function that was called in p#2 (refreshGrid()) uses RadAjaxManager's ajaxRequest to rebind the RadGrid control.

 


Regards,
Georgi Tunev
the Telerik team

Instantly find answers to your questions on the new Telerik Support Portal.
Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Tags
Window
Asked by
Amitkumar
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Amitkumar
Top achievements
Rank 1
Georgi Tunev
Telerik team
Share this question
or