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

refresh grid in parent form from popup form.

3 Answers 226 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Saro
Top achievements
Rank 1
Saro asked on 17 May 2012, 05:14 PM
Hello,
I have a grid on Form A. I have data in the session variable which is set as the datasource in the grid's needdatasource

RadGridItems.DataSource = Session[cKIWebHelper.SelectListSessionVariables.const_Session_GridData];

Now, i display a popup form B

window.showModalDialog


then when I am finished doing what I have to do in the popup form I update data into the Session[cKIWebHelper.SelectListSessionVariables.const_Session_GridData]; (add records, remove records etc)

immediatlyl after I close the popup I would like to refresh the grid in Form A. How do I do FormA.RadGridItems.Databind() ?

3 Answers, 1 is accepted

Sort by
0
Richard
Top achievements
Rank 1
answered on 18 May 2012, 10:42 PM
Saro:

If I understand your requirement correctly, then I believe you will find a solution for refreshing the FormA.RadGridItems after closing the modal popup in this forum thread:

Refreshing the parent page on close

I hope this helps!
0
Saro
Top achievements
Rank 1
answered on 18 May 2012, 11:48 PM
Thank you very much for sending me this.  This is very helpful.  My code is behaving far better now.  I am wondering if I can somehow make it slightly better.
Now the grid refresh but so does the entire form.  IsPostBack value is set to false.  Therefore everything gets repainted. I played around with some session variables and was able to kind of go around the page load. 
But is there a better way of passing the Parent web page handle to the child for so that the child form issues a form.grid.rebind()?

Imagine you have grid in formA.  You pop a modal form B.  FormB then adds some records in to a session object. NOw you close formb and want to refresh just the grid in formA not everything else.Maybe this is not possible in web world.
Thanks for your help though
0
Richard
Top achievements
Rank 1
answered on 21 May 2012, 06:21 PM
Saro:

If you simply want to refresh the RadGrid that's located on your parent page, and not the entire page, you can use the solution that's demonstrated by the Grid/Window Editing online demo, and covered in the following forum thread:

How to refresh radgrid with javascript

I hope this helps!
Tags
Grid
Asked by
Saro
Top achievements
Rank 1
Answers by
Richard
Top achievements
Rank 1
Saro
Top achievements
Rank 1
Share this question
or