hi, im newbie in telerik, i want to ask my problem
i have a grid, textbox and button in parent form.
the button in parent form will show the radwindow when we clicked it, and we can choose the griditem in that radwindow .
when we closed it, its automatically set field to textbox in parent form AND changed the grid in parent form too, depanding value in radwindow argument.
the parent form
but when i refresh parent page with "getRadWindow().BrowserWindow.location.reload()" after that radwindow close, the argument in radwindow can't be read to textbox
in child menu
anybody can help me?
thanks before
i have a grid, textbox and button in parent form.
the button in parent form will show the radwindow when we clicked it, and we can choose the griditem in that radwindow .
when we closed it, its automatically set field to textbox in parent form AND changed the grid in parent form too, depanding value in radwindow argument.
the parent form
<
telerik:RadScriptBlock
runat
=
"server"
ID
=
"rsb1"
>
<
script
type
=
"text/javascript"
>
function OnClientClose(oWnd, args) {
var arg = args.get_argument();
if (arg) {
var tb = document.getElementById('<%=TextBox1.ClientID %>');
tb.value = arg.NamaUser;
}
}
</
script
>
</
telerik:RadScriptBlock
>
<
telerik:RadWindowManager
ID
=
"RadWindowManager1"
ShowContentDuringLoad
=
"false"
VisibleStatusbar
=
"false"
ReloadOnShow
=
"true"
runat
=
"server"
>
<
Windows
>
<
telerik:RadWindow
ID
=
"RadWindow1"
runat
=
"server"
Width
=
"650"
Height
=
"480"
Behaviors
=
"Close"
OnClientClose
=
"OnClientClose"
Modal
=
"True"
ReloadOnShow
=
"True"
NavigateUrl
=
"umpilihuserpopup.aspx"
>
</
telerik:RadWindow
>
</
Windows
>
</
telerik:RadWindowManager
>
<
div
style
=
"background-color: #e6e6e6;"
>
Choose User <
telerik:RadButton
ID
=
"btnlistuser"
runat
=
"server"
onclick
=
"openWin(); return false;"
></
telerik:RadButton
>
<
asp:TextBox
ID
=
"TextBox1"
runat
=
"server"
></
asp:TextBox
>
but when i refresh parent page with "getRadWindow().BrowserWindow.location.reload()" after that radwindow close, the argument in radwindow can't be read to textbox
in child menu
<
script
type
=
"text/javascript"
>
function getRadWindow() {
var oWindow = null;
if (window.radWindow) oWindow = window.radWindow;
else if (window.frameElement.radWindow) oWindow = window.frameElement.radWindow;
return oWindow;
}
function closeWindow() {
getRadWindow().close();
}
function RefreshParentPage() {
getRadWindow().BrowserWindow.location.reload();
}
function GetFirstDataItemKeyValues() {
var grid = $find("<%=RadGrid1.ClientID %>");
var masterTable = grid.get_masterTableView();
var selectedRows = masterTable.get_selectedItems();
for (var i = 0; i < selectedRows.length; i++) {
var row = selectedRows[i];
var cell = masterTable.getCellByColumnUniqueName(row, "USER_NAME");
var cell2 = masterTable.getCellByColumnUniqueName(row, "USER_ID");
var oArg = new Object();
oArg.myName = document.getElementById("myName").value;
oArg.Kode = cell2.innerHTML;
oArg.NamaUser = cell.innerHTML;
var currentWindow = getRadWindow();
currentWindow.close(oArg);
RefreshParentPage();
}
anybody can help me?
thanks before