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

Rebind Grid in a Normal page after Edit/Update in Rad Popup window

7 Answers 194 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Mathews
Top achievements
Rank 1
Mathews asked on 26 Jun 2008, 01:09 PM

Hello
i am  having a normal aspx which contain splitter control.inside that am using
<radspl:RadPane ID="rpTaregetWindow" runat="server" ContentUrl="DefaultTarget.aspx"Scrolling="Both">
</radspl:RadPane>.
my page is populating inside this radpane rpTaregetWindow.
my page which contain a rad grid .on clicking on edit,am popuping a new rad window for edit
update function.after performing the task .i can close the window by GetRadWindow().Close();
on click of save/cancel.my requirement is to reload the parent page(normal aspx page which is
not rad window) with  reload of grid with previous update that we have made in popup
(child.this was not happening for my case.
if any one can help me, please reply as soon as possible

Thanks
Regards
Mathews Baby

 

7 Answers, 1 is accepted

Sort by
0
Svetlina Anati
Telerik team
answered on 27 Jun 2008, 04:30 PM
Hello Mathews,

I already answered your other thread and for your convenience I attached the reply below:

I assume that you are using RadControls for ASP.NET, not the RadControls for ASP.NET AJAX.

I suggest to examine this online demo which shows how to implement the desired scenario by using an ajax request when the RadGrid and the RadWindowManager are on the same page.

In case they are not, please examine this KB article which explains referencing content page in a splitter pane from the parent page and vice versa.

Let me know if you need further assistance. 


All the best,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Mathews
Top achievements
Rank 1
answered on 30 Jun 2008, 07:09 AM
Hi thank u very much for your response

when i edit through a popup window ,after closing i need to bind the grid
in child window am using the script as follows
function RedirectToParent()
{
    GetRadWindow().Close();     
     return false;
    
}
after closing the child window ,i need to rebind ,the grid in parent
for that i need solution

expecting reply soon
regards
mathews
0
Svetlina Anati
Telerik team
answered on 02 Jul 2008, 05:42 AM
Hi Mathews,

You can rebind the grid by using ajax as shown in the online example:

 
            function refreshGrid(arg)  
            {  
             if(!arg)  
             {  
                 window["<%= RadGrid1.ClientID %>"].AjaxRequest('<%= RadGrid1.UniqueID %>''Rebind');  
                }  
                else 
                {  
                 window["<%= RadGrid1.ClientID %>"].AjaxRequest('<%= RadGrid1.UniqueID %>''RebindAndNavigate');  
                }  
            }  
 

and in code-behind:

    protected override void RaisePostBackEvent(IPostBackEventHandler sourceControl, string eventArgument)  
        {  
            base.RaisePostBackEvent(sourceControl, eventArgument);  
 
            if (sourceControl is RadGrid)  
            {  
                switch (eventArgument)  
                {  
                    case "Rebind":  
                        RadGrid1.MasterTableView.SortExpressions.Clear();  
                        RadGrid1.MasterTableView.GroupByExpressions.Clear();  
                        RadGrid1.Rebind();  
                        break;  
                    case "RebindAndNavigate":  
                        RadGrid1.MasterTableView.SortExpressions.Clear();  
                        RadGrid1.MasterTableView.GroupByExpressions.Clear();  
                        RadGrid1.MasterTableView.CurrentPageIndex = RadGrid1.MasterTableView.PageCount - 1;  
                        RadGrid1.Rebind();  
                        break;  
                }  
            }  
        }  
    }  
 

This code concerns the main page, where the RadWindow is declared. In case you want to execute it when the RadWindow closes you can assign it to its OnClientClose property.



Best wishes,
Svetlina
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Frankie
Top achievements
Rank 2
answered on 09 Jul 2008, 01:17 PM
hi, how to do that if i am using RadControls for ASP.NET AJAX?
0
Sebastian
Telerik team
answered on 09 Jul 2008, 01:24 PM
Hello Frankie,

Review these online resources to understand how to modify the code to make it operational with RadControls for ASP.NET AJAX:

http://www.telerik.com/DEMOS/ASPNET/Prometheus/Controls/Examples/Integration/GridAndWindow/DefaultCS.aspx?product=grid
http://www.telerik.com/support/kb/article/b454K-gmb-b454T-cba-b454c-cba.aspx

Best regards,
Stephen
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
0
Frankie
Top achievements
Rank 2
answered on 09 Jul 2008, 04:10 PM
hi there,

i get error when using the same concept applied to load grid under one of the radtapstrip ajax(load on demand, using ajax).  how could i solve this by not compromising disabling the radtapstrip load on demand?

appreciate your promptly reply.

best regards,
frankie
0
Paul
Telerik team
answered on 16 Jul 2008, 01:12 PM
Hi Frankie,

Unfortunately, the provided information does not help us much in reproducing the error. I'm afraid we could not be of much help unless we reproduce the issue on our side. It will be best if you can open a support ticket and send us a simple running project (incl. your custom skin, CSS, images, DB backup if needed and so on) demonstrating the problem (and step-by-step instructions on doing so). In that way we can reproduce and pinpoint the problems you're facing on our side, understand the logic of your application and provide a solution.

Sincerely yours,
Paul
the Telerik team

Instantly find answers to your questions at the new Telerik Support Center
Tags
General Discussions
Asked by
Mathews
Top achievements
Rank 1
Answers by
Svetlina Anati
Telerik team
Mathews
Top achievements
Rank 1
Frankie
Top achievements
Rank 2
Sebastian
Telerik team
Paul
Telerik team
Share this question
or