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

RADWINDOW

3 Answers 70 Views
Window
This is a migrated thread and some comments may be shown as answers.
M.R.
Top achievements
Rank 1
M.R. asked on 04 Aug 2008, 06:52 AM
Hi,

I have a parent window with a Grid and a button. Button will open a RadWindow with  a Grid in it. The second grid will be populated depending on the user query and then user will select more than one rows and close the Radwindow. Grid1 should be populated with the selected data from the Radwindow.

The problem I have is, the selected rows are in "Session("returnedValues") and I can populate the grid1 with selected data by reloading the page. But I don't want to reload the entire page just refresh the grid1.

Could any one help with sample code? Thanks

3 Answers, 1 is accepted

Sort by
0
Georgi Tunev
Telerik team
answered on 04 Aug 2008, 07:59 AM
Hi M.R.,

I suggest to check the refreshGrid function in the Window Editing demo. There you can see how to update a the grid by using Ajax request.



Sincerely yours,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
M.R.
Top achievements
Rank 1
answered on 04 Aug 2008, 08:19 AM
Hi,

Thanks for the quick reply. I had a look at the sample. I am still unable to find an ansert to my problem and I am running out of time.

My requirement is, I need to pass the selected rows of Grid2 from Radwindow back to the Grid1 in parent window. What is the best way of refreshing just the grid without reloading the entire page?

Your help is much appreciated
0
Georgi Tunev
Telerik team
answered on 05 Aug 2008, 11:39 AM
Hi M.R.,

I am not sure what exactly you want to achieve - to rebind the grid without refreshing the whole page, or to pass information about the selected rows from the grid in the content page to the grid in the parent page.

Note that the content page is separate from the parent one - this means that the communication between them is done on the client with Javascript. If you want to simply rebind the grid, you can use the refreshGrid() function from the demo that I sent you. You can execute it in the OnClientClose eventhandler of the RadWindow that you are using and it will work as expected.

If you want to pass the data when the row is clicked, I suggest to check the following topics from the documentation:

http://www.telerik.com/help/aspnet-ajax/grid_onrowselected.html - here is how to hook to the onrowselected eventhandler of the grid in the conten page and get the selected row.

http://www.telerik.com/help/aspnet-ajax/grid_getcellbycolumnuniquename.html - Gives you the cell specified by a row and a column unique name.
 
http://www.telerik.com/help/aspnet-ajax/window_programmingusingradwindowasadialog.html - shows how to use RadWindow as a dialog and to send and receive arguments from the content page that is displayed in it.

http://www.telerik.com/help/aspnet-ajax/grid_selectitem.html - Method which selects the table row passed as an argument or the row corresponding to the index passed as an argument.

I hope this helps. If you still experience problems using RadWindow for this purpose, I suggest to implement the desired logic by using window.open(). Once your code is working as expected with browser's popup, the same approach will work with RadWindow as well.


Kind regards,
Georgi Tunev
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Tags
Window
Asked by
M.R.
Top achievements
Rank 1
Answers by
Georgi Tunev
Telerik team
M.R.
Top achievements
Rank 1
Share this question
or