Hi Devoloper Friends;
I'm using a radgird and entry in the properties rowselected feature is activated,
At the same time, right-click the 'Menu' open.
I click on the DataKeyNames property value of the row you want to get mss.
If more than one row is selected, it brings me the value of the first selected row.
Example;
http://elbisemoda.com/Bilgi/RadGridRightClick.png
JavaScript;
RadGird;
I'm using a radgird and entry in the properties rowselected feature is activated,
At the same time, right-click the 'Menu' open.
I click on the DataKeyNames property value of the row you want to get mss.
If more than one row is selected, it brings me the value of the first selected row.
Example;
http://elbisemoda.com/Bilgi/RadGridRightClick.png
JavaScript;
function
RowContextMenu(sender, eventArgs) {
var
menu = $find(
"<%=RadMenu1.ClientID %>"
);
var
evt = eventArgs.get_domEvent();
var
index = eventArgs.get_itemIndexHierarchical();
sender.get_masterTableView().selectItem(sender.get_masterTableView().get_dataItems()[index].get_element(),
true
);
menu.show(evt);
evt.cancelBubble =
true
;
evt.returnValue =
false
;
if
(evt.stopPropagation) {
evt.stopPropagation();
evt.preventDefault();
}
}
RadGird;
<
telerik:RadGrid
ID
=
"grdVeresiyeFisList"
AllowFilteringByColumn
=
"false"
Height
=
"445px"
AutoGenerateColumns
=
"false"
runat
=
"server"
AllowMultiRowSelection
=
"True"
EnableAjaxSkinRendering
=
"True"
Culture
=
"tr-TR"
GridLines
=
"None"
EnableLinqExpressions
=
"False"
Skin
=
"Metro"
PagerStyle-Visible
=
"false"
OnItemCommand
=
"grdVeresiyeFisList_ItemCommand"
OnItemDataBound
=
"grdVeresiyeFisList_ItemDataBound"
OnNeedDataSource
=
"grdVeresiyeFisList_NeedDataSource"
OnDetailTableDataBind
=
"grdVeresiyeFisList_DetailTableDataBind"
ShowStatusBar
=
"True"
EnableHeaderContextMenu
=
"True"
CellPadding
=
"0"
CellSpacing
=
"0"
ShowFooter
=
"true"
>
<
HeaderStyle
Width
=
"150px"
CssClass
=
"cagdasGridHeader"
></
HeaderStyle
>
<
MasterTableView
DataKeyNames
=
"VeresiyeMasterID"
NoMasterRecordsText
=
"Kayıt bulunamadı."
AllowSorting
=
"True"
TableLayout
=
"Auto"
>
<
Columns
>
<
telerik:GridClientSelectColumn
UniqueName
=
"chkSelectColumn"
HeaderStyle-Width
=
"30px"
></
telerik:GridClientSelectColumn
>
<
telerik:GridBoundColumn
DataField
=
"VeresiyeMasterID"
HeaderText
=
"VeresiyeMasterID"
ShowFilterIcon
=
"false"
Display
=
"false"
UniqueName
=
"VeresiyeMasterID"
AllowFiltering
=
"false"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"FisAdi"
HeaderText
=
"Fis Adı"
UniqueName
=
"FisAdi"
HeaderStyle-Width
=
"100px"
AllowFiltering
=
"false"
></
telerik:GridBoundColumn
>
.......
........
</
Columns
>
</
MasterTableView
>
<
ClientSettings
AllowColumnHide
=
"True"
AllowColumnsReorder
=
"True"
AllowKeyboardNavigation
=
"True"
AllowDragToGroup
=
"True"
ReorderColumnsOnClient
=
"True"
EnableRowHoverStyle
=
"True"
>
<
ClientEvents
OnRowContextMenu
=
"RowContextMenu"
/>
<
Animation
AllowColumnReorderAnimation
=
"true"
ColumnReorderAnimationDuration
=
"200"
/>
<
Selecting
AllowRowSelect
=
"true"
></
Selecting
>
<
Scrolling
AllowScroll
=
"true"
UseStaticHeaders
=
"true"
></
Scrolling
>
<
Resizing
AllowColumnResize
=
"True"
AllowRowResize
=
"false"
ClipCellContentOnResize
=
"True"
EnableRealTimeResize
=
"True"
AllowResizeToFit
=
"True"
></
Resizing
>
</
ClientSettings
>
</
telerik:RadGrid
>