Hi,
I'm implementing a right click in my application with Windowless,
and I want that when the implementation will happen, a context menu will be shown, without giving it an eventName.
I want that the context menu show in my implementing a right click in my application .
Thanks
3 Answers, 1 is accepted
0
Hello ruty,
If you want manually to open RadContextMenu just set the EventName="" property to empty string.
The to open the context menu use IsOpen=true property.
Let us know if you need more help.
Sincerely yours,
Hristo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
If you want manually to open RadContextMenu just set the EventName="" property to empty string.
The to open the context menu use IsOpen=true property.
Let us know if you need more help.
Sincerely yours,
Hristo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
0
ruty
Top achievements
Rank 1
answered on 01 Apr 2009, 07:56 AM
Thank,
I do it, but get error:"Object reference not set to an instance of an object."
my code:
Thanks.
I do it, but get error:"Object reference not set to an instance of an object."
my code:
RadContextMenu buttonContextMenu = new RadContextMenu(); |
buttonContextMenu.ShowDelay =new Duration (new TimeSpan (1,0,0)); |
buttonContextMenu.EventName = " "; |
RadMenuItem item1 = new RadMenuItem() |
{ |
Header = "Statuses" |
}; |
RadMenuItem item11 = new RadMenuItem() |
{ |
Header = "Open" |
}; |
item1.Items.Add(item11); |
RadMenuItem item12 = new RadMenuItem() |
{ |
Header = "New" |
}; |
item1.Items.Add(item12); |
RadMenuItem item13 = new RadMenuItem() |
{ |
Header = "Cancelled" |
}; |
item1.Items.Add(item13); |
buttonContextMenu.Items.Add(item1); |
buttonContextMenu.IsOpen = true; |
RadContextMenu.SetContextMenu(taskElement, buttonContextMenu); |
0
Hello ruty,
You should set EventName to empty string (not space, just "") or null.
And before setting IsOpen=true you should attach the menu to some element.
(switch the last 2 rows).
Let us know if you need more help.
All the best,
Hristo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.
You should set EventName to empty string (not space, just "") or null.
And before setting IsOpen=true you should attach the menu to some element.
(switch the last 2 rows).
Let us know if you need more help.
All the best,
Hristo
the Telerik team
Check out Telerik Trainer , the state of the art learning tool for Telerik products.