Hi
My RadWindow code worked in 826 but not in 1001.
I am returning a value from a radwindow to refresh a RadGrid.
Here is the page code:
And here is the code in the radwindow
Any idea why the closeandrebind event does not work?
It says GetRadWindow is not defined.
Thanks
My RadWindow code worked in 826 but not in 1001.
I am returning a value from a radwindow to refresh a RadGrid.
Here is the page code:
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript"> |
function ShowEditForm(id, rowIndex) { |
var grid = $find("<%= gvwTransactions.ClientID %>"); |
var rowControl = grid.get_masterTableView().get_dataItems()[rowIndex].get_element(); |
grid.get_masterTableView().selectItem(rowControl, true); |
window.radopen("transaction-details.aspx?TransactionId=" + id, "TransactionListDialog"); |
return false; |
} |
function ShowInsertForm(id, node) { |
window.radopen("transaction-details.aspx?ItemId=" + id + "&SelNode=" + node, "TransactionListDialog"); |
return false; |
} |
function ShowMoveForm(id, node) { |
window.radopen("move-stock.aspx?ItemId=" + id + "&SelNode=" + node, "TransactionListDialog"); |
return false; |
} |
function ShowTransferForm(id, node) { |
window.radopen("transfer-split.aspx?ItemId=" + id + "&SelNode=" + node, "TransactionListDialog"); |
return false; |
} |
function refreshGrid(arg) { |
switch (arg) { |
case 'Rebind': |
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("Rebind"); |
break; |
case 'RebindAlsoTable': |
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAlsoTable"); |
break; |
case 'RebindAndNavigate': |
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigate"); |
break; |
case 'RebindAndNavigateAlsoTable': |
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigateAlsoTable"); |
break; |
default: |
$find("<%= RadAjaxManager1.ClientID %>").ajaxRequest("RebindAndNavigateAlsoTable"); |
} |
} |
</script> |
</telerik:RadCodeBlock> |
And here is the code in the radwindow
<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server"> |
<script type="text/javascript"> |
function CloseAndRebind(args) |
{ |
GetRadWindow().Close(); |
GetRadWindow().BrowserWindow.refreshGrid(args); |
} |
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(); |
} |
</script> |
</telerik:RadCodeBlock> |
Any idea why the closeandrebind event does not work?
It says GetRadWindow is not defined.
Thanks