Hi,
How do I get the container of RadMenu? eg
The code below removes the Menu not its container as well:
I want it to be:
More info:
My page consists of UserControls that users can reposition in the page.
Each UserControl has a Rad Menu. When a user swaps around 2 UserControls the radmenu.parent.parent result is incorrect because jquery modified the client-side html but the server-side isn't aware.Therefore using server-side code doesn't work,eg:
RadMenu_ItemClick(object sender, RadMenuEventArgs e)
{
RadMenu radmenu = (RadMenu)sender;
MyUserControl myusercontrol = (MyUserControl)radmenu.Parent.Parent;
when 2 modules swap each others place on a page the myusercontrol is the wrong control.
Hence I'm trying to get the client side method to work, but for the life of me I cant work out how to detect the UserControl that a RadMenu's sits it.
Any help would be much appreciated
How do I get the container of RadMenu? eg
The code below removes the Menu not its container as well:
function OnClicking(sender, eventArgs)
{
var proceed = confirm("Are you sure you want to delete?");
if (!proceed)
{
return false;
}
else
{
alert(eventArgs.Item.Parent.LinkElement.id);
var ctrl = document.getElementById(eventArgs.Item.Parent.LinkElement.id);
ctrl.parentNode.removeChild(ctrl);
}
I want it to be:
ctrl.parentNode.PARENT.removeChild(ctrl);
More info:
My page consists of UserControls that users can reposition in the page.
Each UserControl has a Rad Menu. When a user swaps around 2 UserControls the radmenu.parent.parent result is incorrect because jquery modified the client-side html but the server-side isn't aware.Therefore using server-side code doesn't work,eg:
RadMenu_ItemClick(object sender, RadMenuEventArgs e)
{
RadMenu radmenu = (RadMenu)sender;
MyUserControl myusercontrol = (MyUserControl)radmenu.Parent.Parent;
when 2 modules swap each others place on a page the myusercontrol is the wrong control.
Hence I'm trying to get the client side method to work, but for the life of me I cant work out how to detect the UserControl that a RadMenu's sits it.
Any help would be much appreciated