Hi,
I was referring to the following article to add a custom RadMenuItem to the GridContextMenu of the FileExplorer.
http://www.telerik.com/help/aspnet-ajax/radfileexplorer-add-custom-button-context-menu-item.html
Instead of handling the "Click" event with javascript, I'd like to handle it with code behind.
The problem is I can't seem to get a reference to the current item. I'd like to get its path.
I tried using RadMenuItem.DataItem but it returns null. I then read that it is only usable on DataBinding/Bound events.
Can someone point me in the right direction please?
Thank you.
Here's the code: (please note that "ucFileExplorer" is the reference to the RadFileExplorer user control that is currently on the page)
I was referring to the following article to add a custom RadMenuItem to the GridContextMenu of the FileExplorer.
http://www.telerik.com/help/aspnet-ajax/radfileexplorer-add-custom-button-context-menu-item.html
Instead of handling the "Click" event with javascript, I'd like to handle it with code behind.
The problem is I can't seem to get a reference to the current item. I'd like to get its path.
I tried using RadMenuItem.DataItem but it returns null. I then read that it is only usable on DataBinding/Bound events.
Can someone point me in the right direction please?
Thank you.
Here's the code: (please note that "ucFileExplorer" is the reference to the RadFileExplorer user control that is currently on the page)
protected void Page_Load(object sender, EventArgs e)
{
RadMenuItem menuAlertMe = new RadMenuItem("Alert Me");
menuAlertMe.Value = "AlertMe";
ucFileExplorer.GridContextMenu.Items.Add(menuAlertMe);
ucFileExplorer.GridContextMenu.ItemClick += new RadMenuEventHandler(GridContextMenu_ItemClick);
}
private void GridContextMenu_ItemClick(object sender, RadMenuEventArgs e)
{
RadMenuItem menuItem = e.Item as RadMenuItem;
if (menuItem.Value == "AlertMe")
{
// I want to get a hold of the current item of the Grid so I can process it...
}
}