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

ajaxed control not updated

1 Answer 35 Views
Ajax
This is a migrated thread and some comments may be shown as answers.
tony
Top achievements
Rank 1
tony asked on 30 May 2012, 11:14 PM
my situation is based on this example: http://demos.telerik.com/aspnet-ajax/controls/examples/integration/gridandwindow/defaultcs.aspx?product=grid

the main differences in my scenario are that i am calling the radwindow from a grid hosted in an ajax control toolkit tab form. i have a radajaxmanager declared on the page outside of the scope of the tab. the first tab contains a grid whose selection drives the data selection results of two grids on another tab and 1 grid on a third tab. the third tab contains a radwindowmanager and radwindow which is opened from the grid. a selection is made whereupon a button click event of the radwindow (aspx.cs) writes the data and then calls for a refresh of the parent grid as follows:
ClientScript.RegisterStartupScript(Page.GetType(), "registerkey", "CloseAndRebind('Registration');", true);

which calls this from the radwindow (aspx) :
function CloseAndRebind(args) {
    GetRadWindow().BrowserWindow.refreshGrid(args);
    GetRadWindow().close();
}

which calls this from parent page's tab (aspx)
function refreshGrid(arg) {
if (!arg) {
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest();
}
else {
var ajaxManager = $find("<%= RadAjaxManager1.ClientID %>");
ajaxManager.ajaxRequest(arg);
}
}

which finally calls this in the aspx.cs

 

protected void RadAjaxManager1_AjaxRequest(object sender, AjaxRequestEventArgs e)
{
   RadGrid1.Rebind();
    RadGrid2.Rebind();
   RadGrid3.Rebind();
}

 

tab2 (with 2 grids) has radajaxmanagerproxy and the tab works well. tab3 with radgrid3 works ok when updated by tab1 grid1 but not when updated from the radwindow. i have tried radajaxmanagerproxy on tab 3 grid 3 with no success with and without a radajaxpanel.

i have never been able to debug into the ajaxrequest - not sure if it is possible. i have configured radajaxmanagerproxy through its editor but  it does not see the radajaxmanager.

any ideas about why tab3 will not rebind?

i don't need to update all of these grids each time but for now i am using this bloated code until i can get tab 3 to update properly...


1 Answer, 1 is accepted

Sort by
0
tony
Top achievements
Rank 1
answered on 31 May 2012, 01:39 AM
i am quite embarrassed to report that the culprit was a missing element in the radajaxmanager:
OnAjaxRequest="RadAjaxManager1_AjaxRequest"

it was there at one time but went missing in action......the moral of the story is don't forget to check if the damned thing is plugged in.

Tags
Ajax
Asked by
tony
Top achievements
Rank 1
Answers by
tony
Top achievements
Rank 1
Share this question
or