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

Rebinding a RadGrid from within a User Control

1 Answer 86 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
Ryan
Top achievements
Rank 1
Ryan asked on 09 Nov 2012, 04:43 PM
Hi,
This sounds trivial and simple, however I cannot seem to do it.
I have a parent page with an Ajax Manager, this encapsulates a UserControl that consist of some buttons and a radgrid.
When the "Add" Button is pressed on my user Control a radwindow pops up and following the save of the data on the radwindow, I would like to refresh the RadGrid within the UserControl.
On my Parent Page, I have a RadAjaxManager meaning I cannot add another one to my user control, so how would I rebind and refresh my radgrid on a radwindow close?
I have a RadAjaxProxyManager although I'm not overly sure how to "link" it to my Parent Ajax Manager.
Hope this Makes Sense
Thanks very much for your help
Ryan

1 Answer, 1 is accepted

Sort by
0
Eyup
Telerik team
answered on 14 Nov 2012, 09:28 AM
Hi Ryan,

Please try using the following approach to rebind the grid:
<telerik:RadWindow ... OnClientClose="refreshGrid">
JavaScript:
function refreshGrid() {
     var masterTable = $find("<%= RadGrid1.ClientID %>").get_masterTableView();
     masterTable.rebind();
 }

I hope this will prove helpful.

Kind regards,
Eyup
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.
Tags
Ajax
Asked by
Ryan
Top achievements
Rank 1
Answers by
Eyup
Telerik team
Share this question
or