I've got a form with the two RadGrids, each one within a RadDock.
If I open a window from a RadDock Command, and then handle the onClientClose event as per the script below the script runs OK and the RadGridFlightMeals rebinds and displays correctly. However if I try to then Rebind RadGridFlightSeats by calling RadGridRebindFlightSeats() from within CloseRadWindowCreateFlightMeal() this says the object is null and cannot be found.
I've tried calling seperately as per above and also including the find and rebind options within a single script but neither works.
However if I call RadGridRebindFlightSeats() from server side using...
If I open a window from a RadDock Command, and then handle the onClientClose event as per the script below the script runs OK and the RadGridFlightMeals rebinds and displays correctly. However if I try to then Rebind RadGridFlightSeats by calling RadGridRebindFlightSeats() from within CloseRadWindowCreateFlightMeal() this says the object is null and cannot be found.
I've tried calling seperately as per above and also including the find and rebind options within a single script but neither works.
However if I call RadGridRebindFlightSeats() from server side using...
RadScriptManager.RegisterStartupScript(
this
,
this
.GetType(),
"RadGridRebindFlightSeats"
,
"RadGridRebindFlightSeats();"
,
true
);
...
when not closing a radwindow but from another command button on the dock header the script works OK...???
<
telerik:RadWindow
runat
=
"server"
ID
=
"RadWindowCreateFlight"
InitialBehaviors
=
"None"
NavigateUrl
=
"~/Dialogs/CreateFlight.aspx"
ReloadOnShow
=
"true"
Animation
=
"None"
OnClientClose
=
"CloseRadWindowCreateFlight"
Height
=
"550px"
Modal
=
"true"
Title
=
"Create Flight"
Width
=
"700px"
Behaviors
=
"Close, Move"
Enabled
=
"True"
VisibleStatusbar
=
"False"
IconUrl
=
"~/favicon.ico"
KeepInScreenBounds
=
"True"
ShowContentDuringLoad
=
"False"
>
</
telerik:RadWindow
>
function
CloseRadWindowCreateFlightMeal() {
var
action = get_cookie(
"ACTION"
);
delete_cookie(
"ACTION"
);
if
(action ==
"FLIGHT MEAL CREATED"
) {
var
tabStrip = $find(
"ctl00_contentBody_tabStripEvent"
);
var
tab = tabStrip.findTabByText(
'Flights'
);
tab.set_selected(
true
);
//The same as tab.select();
var
multiPage = $find(
"ctl00_contentBody_multiPageEvent"
);
var
pageView = multiPage.findPageViewByID(
"ctl00_contentBody_pageFlights"
);
pageView.set_selected(
true
);
var
masterTable = $find(
"ctl00_contentBody_RadDockFlightMeals_C_RadGridFlightMeals"
).get_masterTableView();
masterTable.rebind();
}
return
false
;
}
function
RadGridRebindFlightSeats() {
var
masterTable = $find(
"ctl00_contentBody_RadDockFlightSeats_C_RadGridFlightSeats"
).get_masterTableView();
masterTable.rebind();
return
false
;
}