This is a migrated thread and some comments may be shown as answers.

Context menu Empty area problem

1 Answer 61 Views
ContextMenu
This is a migrated thread and some comments may be shown as answers.
saurabh(GV433015)
Top achievements
Rank 1
saurabh(GV433015) asked on 22 Apr 2011, 08:55 AM

Hello Team,

I m using RadContextMenu in my tree node control.
i have 4 menuitem in Context Menu. on certain condition i have to hide a Item. i m using .Visibility = ElementVisibility.Visible; property to hide\ show the menu item. but when i m hiding menu item , it is showing empty space in my RadContextMenu .
Kindly provide the solution to hide empty space(i do't want to remove item from RadContextMenu).Please refer the attachment.


Thanks and Regards,
Saurabh dubey

1 Answer, 1 is accepted

Sort by
0
Nikolay
Telerik team
answered on 22 Apr 2011, 10:56 AM
Hi saurabh,

In order to get the desired effect, you should set the Visibility property of context menu item in question to Collapsed. This will exclude the item from the layout calculations:
this.radMenuItem1.Visibility = Telerik.WinControls.ElementVisibility.Collapsed;

I hope this helps.

All the best,
Nikolay
the Telerik team
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items
Tags
ContextMenu
Asked by
saurabh(GV433015)
Top achievements
Rank 1
Answers by
Nikolay
Telerik team
Share this question
or