Hello Telerik developers;
My problem radGrid in right click open contextMenu and context menu item click, How do I get Gird selected item value
How do I get RadGrid in MasterTable in GirdBoundColum CekKartID value ? javascript code ? don't server side. did javascript code
Html RadGrid
Html Context Menu
JavaScript
My problem radGrid in right click open contextMenu and context menu item click, How do I get Gird selected item value
How do I get RadGrid in MasterTable in GirdBoundColum CekKartID value ? javascript code ? don't server side. did javascript code
Html RadGrid
<
telerik:RadGrid
ID
=
"grdCekKartMaster"
Width
=
"100%"
Height
=
"69%"
BorderStyle
=
"None"
runat
=
"server"
AllowFilteringByColumn
=
"false"
OnNeedDataSource
=
"grdCekKartMaster_NeedDataSource"
>
<
HeaderStyle
BackColor
=
"#767980"
ForeColor
=
"White"
/>
<
FooterStyle
BackColor
=
"White"
ForeColor
=
"White"
/>
<
MasterTableView
runat
=
"server"
Width
=
"100%"
DataKeyNames
=
"CekKartID"
PageSize
=
"9999"
>
<
ItemStyle
Font-Size
=
"Small"
Height
=
"35"
/>
<
AlternatingItemStyle
Font-Size
=
"Small"
Height
=
"35"
/>
<
Columns
>
<
telerik:GridBoundColumn
DataField
=
"CekKartID"
HeaderText
=
"ID"
AllowFiltering
=
"true"
ReadOnly
=
"true"
ShowFilterIcon
=
"false"
Visible
=
"false"
UniqueName
=
"CekKartID"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"EvrakTip"
HeaderText
=
"Evrak Tip"
AllowFiltering
=
"true"
FilterControlWidth
=
"80%"
ShowFilterIcon
=
"false"
HeaderStyle-Width
=
"100px"
></
telerik:GridBoundColumn
>
<
telerik:GridBoundColumn
DataField
=
"CekDurum"
HeaderText
=
"Çek Durum"
AllowFiltering
=
"true"
FilterControlWidth
=
"80%"
ShowFilterIcon
=
"false"
HeaderStyle-Width
=
"100px"
></
telerik:GridBoundColumn
>
</
Columns
>
</
MasterTableView
>
<
ClientSettings
>
<
ClientEvents
OnRowContextMenu
=
"RowContextMenu"
/>
<
Selecting
AllowRowSelect
=
"true"
/>
<
Scrolling
AllowScroll
=
"false"
></
Scrolling
>
</
ClientSettings
>
</
telerik:RadGrid
>
Html Context Menu
<
telerik:RadContextMenu
ID
=
"RadMenu1"
runat
=
"server"
EnableRoundedCorners
=
"true"
EnableShadows
=
"true"
OnClientItemClicked
=
"rightClickHandler"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Add"
Value
=
"add"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Edit"
Value
=
"edit"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Delete"
Value
=
"delete"
>
</
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadContextMenu
>
JavaScript
function
rightClickHandler(sender, args) {
var
menuItemValue = args.get_item().get_value();
if
(menuItemValue ==
"add"
) {
alert(
"add click"
);
}
else
if
(menuItemValue ==
"edit"
) {
alert(
"edit click"
);
}
else
if
(menuItemValue ==
"delete"
) {
alert(
"delete click"
);
}
}