Hello,
I have a hierarchical grid. At the client side, i have the following OnRowContextMenu event
function RowContextMenu(sender, eventArgs) {
document.getElementById(lblRowIndex").value = eventArgs.get_itemIndexHierarchical();
document.getElementById(rdMethodClickedTableId").value = this.UID;
}
this function allow to save the index of the grid item associated to the context menu.
On other hand, I have a server side event RdDocumentMenu_ItemClick fired by the RadcontextMenu click.
And In this function,i want to retrieve the GridDataItem by giving its index that it was saved in the lblRowIndex text field.
How can I do it?
Thank You,
I have a hierarchical grid. At the client side, i have the following OnRowContextMenu event
function RowContextMenu(sender, eventArgs) {
document.getElementById(lblRowIndex").value = eventArgs.get_itemIndexHierarchical();
document.getElementById(rdMethodClickedTableId").value = this.UID;
}
this function allow to save the index of the grid item associated to the context menu.
On other hand, I have a server side event RdDocumentMenu_ItemClick fired by the RadcontextMenu click.
<
ItemTemplate
>
<
telerik:RadContextMenu
runat
=
"server"
ID
=
"MenuDocument"
Skin
=
"WebBlue"
EnableRoundedCorners
=
"true"
EnableShadows
=
"true"
EnableViewState
=
"true"
OnItemClick
=
"RdDocumentMenu_ItemClick"
OnClientItemClicking
=
"OnDocumentMenuClicking"
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"ManageDesignProcess.editstep.lblMnuItemDocumentEdit"
Value
=
"Edit"
ImageUrl='~/Images
/menu/menu_sub.gif'
ImageOverUrl
=
'~/Images/menu/over/menu_sub.gif'
/>
</
Items
>
</
telerik:RadContextMenu
>
</
ItemTemplate
>
protected void RdDocumentMenu_ItemClick(object sender, RadMenuEventArgs e)
{
string sDocumentClickedRowIndex;
string sUId;
sDocumentClickedRowIndex = lblRowIndex.Text;
sUId = rdMethodClickedTableId.Text;
GridTableView tableView = this.Page.FindControl(sUId) as GridTableView;
GridDataItem dataItem = tableView.Items[sDocumentClickedRowIndex]; (??)
}
How can I do it?
Thank You,