Hello everybody,
I am using a radwindow that will be opened from my radGrid through some JavaScript code,
<script type="text/javascript">
function ShowEditForm(id, rowIndex) {
var grid = $find("<%= RadGrid1.ClientID %>");
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element();
grid.get_masterTableView().selectItem(rowControl, true);
window.radopen("EditFormCS.aspx?PanelId=" + id, "UserListDialog");
return false;
}
function ShowInsertForm() {
window.radopen("EditFormCS.aspx", "UserListDialog");
return false;
}
function refreshGrid(arg) {
if (!arg) {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind");
}
else {
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate");
}
}
function RowDblClick(sender, eventArgs) {
window.radopen("EditFormCS.aspx?PanelId=" + eventArgs.getDataKeyValue("PanelId"), "UserListDialog");
}
</script>
After a while it enconcuter an error when I am trying to open the radwindow, and it seems that it never free the resources(memory) after I close
the radwindow.I have read so many posts and none of them come to solve the problem.
For instance I used Garbage collector to free the resource but it dosnt work.I restart
The Server(Immagin how terrible is it when so many Users are connected )and it is ok until it take whole the memory again.
The structur is :
Myfolder :
myPage(RaddGrid is in this page and radwindow will be opened through a link insid the Grid)
EditForm(content of radwinow)
And in EditForm after user Submit it will close the radwindow
<script type="text/javascript">
function CloseAndRebind(args) {
GetRadWindow().BrowserWindow.refreshGrid(args);
GetRadWindow().close();
}
function GetRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow; //Will work in Moz in all cases, including clasic dialog
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow; //IE (and Moz as well)
return oWindow;
}
function CancelEdit() {
GetRadWindow().close();
}
function onError(input, args) {
var message = "Invalid character: ";
message += "accepts only numberic values.";
document.getElementById("numInput").innerHTML = args.get_inputText();
document.getElementById("numErrorOut").innerHTML = message;
}
function onKeyPress(input, args) {
document.getElementById("numInput").innerHTML = "";
document.getElementById("numErrorOut").innerHTML = "";
}
function Close() {
GetRadWindow().Close();
}
</script>
And my GC is in the submit event :
GC.Collect();
GC.WaitForPendingFinalizers();
GC.Collect();