I have grid on my page located in div with id "Lists":
<
div
id
=
"Lists"
>
<
telerik:RadGrid
runat
=
"server"
ID
=
"mygrid"
<ClientSettings>
<
ClientEvents
OnGridCreated
=
"document_Grid_OnGridCreated"
/>
</
ClientSettings
>
</
telerik:RadGrid
>
</
div
>
<
div
id
=
"ParentList"
>
</
div
>
when grid is created documentGrid variable is set with that grid:
<script type=
"text/javascript"
>
var
documentGrid =
null
;
function
document_Grid_OnGridCreated(sender, args) {
documentGrid = sender;
}
</script>
to this point everything seems to be fine, I can call following code:
function
updateDocumentGrid(){
documentGrid.get_masterTableView().rebind();
}
after I move Lists div inside another div with id ParentList
global variable window.documentGrid is null.
is there any way to prevent variable documentGrid from beeing set to null?