This is a migrated thread and some comments may be shown as answers.
How to close radwindow and refersh the parent radgrid and stay on the page where opens the radwindow
1 Answer 24 Views
This is a migrated thread and some comments may be shown as answers.
Top achievements
Rank 1
JJ asked on 08 Feb 2013, 08:41 PM
I have a radgrid, click a hyperlink column on the radgrid opens a rad window, after I edit the text field on the rad window, I need to close the radwindow and refresh the grid to show the text change. The grid has mutiple  pages. If I was on page 5 before open the radwinow, after close radwindow, grid gets refreshed and goes to page 1. Is there anyway that I can let the grid stays on page 5 after radwindow close?

<telerik:GridHyperLinkColumn DataNavigateUrlFields="TagID, LanguageID2" SortExpression="TagName"  ShowFilterIcon="false"
                                       DataTextField="TagName" HeaderText="Tag Name" FilterControlWidth="100px" UniqueName="TagName"
                                       AutoPostBackOnFilter="true" CurrentFilterFunction="Contains"  
                                       DataNavigateUrlFormatString="javascript:function anon(){{window.radopen('MyPopUp.aspx?TID={0}&LID={1}','TranslationView');}};anon();">
                                       <HeaderStyle Width="100px" />
script type="text/javascript">
      function OnClientClose(sender, args) {
               top.location.href = top.location.href;

1 Answer, 1 is accepted

Sort by
Telerik team
answered on 13 Feb 2013, 02:20 PM
Hello JJ,

You didn't say what binding are you using server or client. I will assume that you are using server side binding, because of the AutoPostBackOnFilter that you are using.

What you can do is as follows: during the PreRender of your page of your grid, save the grid.CurrentPageIndex into the session object or inside an asp:HiddenField. This way you will know what was the previous index.

Then on client closing of your window, you can update another HiddenField's value (or use the same field based on your code logic), to indicate that you need to change the index server side.

Then on Page_Load of your page  or in the ItemCommand of your grid set grid.CurrentPageIndex to the old value and then rebind the grid.

Kind regards,
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
Asked by
Top achievements
Rank 1
Answers by
Telerik team
Share this question