6 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 14 Jul 2011, 08:24 AM
Hello Teoman,
You can try the same approach in the following help documentation by attaching OnClientShow and OnClientClose event handlers.
Using RadWindow as a Dialog.
Thanks,
Princy.
You can try the same approach in the following help documentation by attaching OnClientShow and OnClientClose event handlers.
Using RadWindow as a Dialog.
Thanks,
Princy.
0
Hello guys,
You could also check the following KB:
http://www.telerik.com/support/kb/aspnet-ajax/grid/passing-data-to-parent-page-from-radgrid-displayed-in-radwindow.aspx
Kind regards,
Georgi Tunev
the Telerik team
You could also check the following KB:
http://www.telerik.com/support/kb/aspnet-ajax/grid/passing-data-to-parent-page-from-radgrid-displayed-in-radwindow.aspx
Kind regards,
Georgi Tunev
the Telerik team
Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!
0
Teoman
Top achievements
Rank 1
answered on 14 Jul 2011, 09:48 AM
Thanks for your reply.
i solved my problem.i can return parameter to parent windows but now i have another problem.
If i set column visibility true i can get the value from grid but i set the cloumn visiblility false i cant return value.how can i fix this?i am trying to do it like this.ID is the column name on grid which i cant get the value from when it's visible=false
i solved my problem.i can return parameter to parent windows but now i have another problem.
If i set column visibility true i can get the value from grid but i set the cloumn visiblility false i cant return value.how can i fix this?i am trying to do it like this.ID is the column name on grid which i cant get the value from when it's visible=false
<
telerik:RadGrid
ID
=
"grdCustomers"
runat
=
"server"
GridLines
=
"None"
EnableEmbeddedSkins
=
"False"
Skin
=
"customGrid"
AllowFilteringByColumn
=
"True"
AutoGenerateColumns
=
"False"
>
<
GroupingSettings
CaseSensitive
=
"False"
/>
<
ClientSettings
>
<
Selecting
AllowRowSelect
=
"True"
/>
<
ClientEvents
OnRowSelected
=
"returnToParent"
/>
<
Scrolling
AllowScroll
=
"True"
UseStaticHeaders
=
"True"
/>
</
ClientSettings
>
<
MasterTableView
DataKeyNames
=
"ID"
>
<
CommandItemSettings
ExportToPdfText
=
"Export to Pdf"
></
CommandItemSettings
>
<
RowIndicatorColumn
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
RowIndicatorColumn
>
<
ExpandCollapseColumn
>
<
HeaderStyle
Width
=
"20px"
></
HeaderStyle
>
</
ExpandCollapseColumn
>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"ID"
UniqueName
=
"ID"
Visible
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CARDNO"
HeaderText
=
"KART NUMARASI"
UniqueName
=
"column2"
Visible
=
"False"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"NAME"
HeaderText
=
"AD"
UniqueName
=
"column3"
AutoPostBackOnFilter
=
"false"
CurrentFilterFunction
=
"Contains"
FilterDelay
=
"4000"
ShowFilterIcon
=
"false"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"SURNAME"
HeaderText
=
"SOYAD"
AutoPostBackOnFilter
=
"false"
CurrentFilterFunction
=
"Contains"
FilterDelay
=
"4000"
ShowFilterIcon
=
"false"
UniqueName
=
"column4"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"DOB"
HeaderText
=
"DOÄžUM TARÄ°HÄ°"
AutoPostBackOnFilter
=
"false"
CurrentFilterFunction
=
"EqualTo"
FilterDelay
=
"4000"
ShowFilterIcon
=
"false"
UniqueName
=
"column5"
DataFormatString
=
"{0:dd/MM/yyyy}"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"PHONE"
HeaderText
=
"TELEFON"
AutoPostBackOnFilter
=
"false"
CurrentFilterFunction
=
"Contains"
FilterDelay
=
"4000"
ShowFilterIcon
=
"false"
UniqueName
=
"column6"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"MOBILE"
HeaderText
=
"CEP TELEFONU"
AutoPostBackOnFilter
=
"false"
CurrentFilterFunction
=
"Contains"
FilterDelay
=
"4000"
ShowFilterIcon
=
"false"
UniqueName
=
"column7"
>
</
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"EMAIL"
HeaderText
=
"E-POSTA"
AutoPostBackOnFilter
=
"false"
CurrentFilterFunction
=
"Contains"
FilterDelay
=
"4000"
ShowFilterIcon
=
"false"
UniqueName
=
"column"
>
</
telerik:GridBoundColumn
>
</
Columns
>
<
EditFormSettings
>
<
EditColumn
InsertImageUrl
=
"Update.gif"
UpdateImageUrl
=
"Update.gif"
EditImageUrl
=
"Edit.gif"
CancelImageUrl
=
"Cancel.gif"
>
</
EditColumn
>
</
EditFormSettings
>
</
MasterTableView
>
<
FilterMenu
EnableEmbeddedSkins
=
"False"
>
</
FilterMenu
>
<
HeaderContextMenu
EnableImageSprites
=
"True"
CssClass
=
"GridContextMenu GridContextMenu_Default"
>
</
HeaderContextMenu
>
</
telerik:RadGrid
>
<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
returnToParent(sender, eventArgs) {
var
oArg =
new
Object();
var
grid = sender;
var
MasterTable = grid.get_masterTableView();
var
row = MasterTable.get_dataItems()[eventArgs.get_itemIndexHierarchical()];
var
cell = MasterTable.getCellByColumnUniqueName(row,
"ID"
);
oArg.userid = cell.innerHTML;
var
oWnd = GetRadWindow();
oWnd.close(oArg);
}
</script>
0
Accepted
Shinu
Top achievements
Rank 2
answered on 14 Jul 2011, 11:01 AM
Hello Teoman,
If you are setting the visibilty of BoundColumn as false, try accessing the DataKeyNames as shown below.
aspx:
Javascript:
Thanks,
Shinu.
If you are setting the visibilty of BoundColumn as false, try accessing the DataKeyNames as shown below.
aspx:
<
MasterTableView
DataKeyNames
=
"ID"
ClientDataKeyNames
=
"ID"
>
</
MasterTableView
>
Javascript:
function
OnRowSelected(sender,eventArgs)
{
var
key=args.getDataKeyValue(
"EmployeeID"
);
alert(key);
}
Thanks,
Shinu.
0
Teoman
Top achievements
Rank 1
answered on 14 Jul 2011, 11:51 AM
hi shinu,
thanks for reply.but i have multiple columns which i dont wanna show in grid?i can i set datekey property more than one?
SOL : ClientDataKeyNames="ID,CARDNO"
thanks for reply.but i have multiple columns which i dont wanna show in grid?i can i set datekey property more than one?
SOL : ClientDataKeyNames="ID,CARDNO"
0
Princy
Top achievements
Rank 2
answered on 15 Jul 2011, 04:42 AM
Hello Teoman,
If you have multiple columns, you can set the ClientDataKeyNames property as many as you want and access it the same way using
Thanks,
Princy.
If you have multiple columns, you can set the ClientDataKeyNames property as many as you want and access it the same way using
"args.getDataKeyValue(
"CARDNO"
)"
. Hope this helps.Thanks,
Princy.