Hi,
I have this issue with a RadComboBox closing my RadMenu drop down sub menu. I can click on input boxes and so forth and I can click to expand the ComboBox without it closing the RadMenu item, but when I select any of the items within the ComboBox it closes the RadMenu item.
How can I prevent it from doing that?
Regards,
Jacques
I have this issue with a RadComboBox closing my RadMenu drop down sub menu. I can click on input boxes and so forth and I can click to expand the ComboBox without it closing the RadMenu item, but when I select any of the items within the ComboBox it closes the RadMenu item.
How can I prevent it from doing that?
Regards,
Jacques
3 Answers, 1 is accepted
0
Accepted
Hi Jacques,
This is expected behavior because RadComboBox detaches its dropdown element and places it outside the menu item template area. To avoid this, please use the following workaround:
Kind regards,
Peter
the Telerik team
This is expected behavior because RadComboBox detaches its dropdown element and places it outside the menu item template area. To avoid this, please use the following workaround:
<script type=
"text/javascript"
>
var
flag =
false
;
function
OnClientItemClosing(sender, args) {
args.set_cancel(flag);
}
function
OnClientDropDownOpening(sender) {
flag =
true
;
}
function
OnClientDropDownClosed(sender) {
setTimeout(
function
() { flag =
false
; }, 200);
}
</script>
<telerik:RadMenu ID=
"RadMenu1"
runat=
"server"
OnClientItemClosing=
"OnClientItemClosing"
>
<Items>
<telerik:RadMenuItem runat=
"server"
Text=
"Root RadMenuItem1"
>
<Items>
<telerik:RadMenuItem runat=
"server"
Text=
"Child RadMenuItem 1"
>
<ItemTemplate>
<telerik:RadComboBox ID=
"RadComboBox1"
runat=
"server"
Style=
"z-index: 99999"
OnClientDropDownOpening=
"OnClientDropDownOpening"
OnClientDropDownClosed=
"OnClientDropDownClosed"
>
<Items>
<telerik:RadComboBoxItem runat=
"server"
Text=
"RadComboBoxItem1"
Value=
"RadComboBoxItem1"
/>
<telerik:RadComboBoxItem runat=
"server"
Text=
"RadComboBoxItem2"
Value=
"RadComboBoxItem2"
/>
<telerik:RadComboBoxItem runat=
"server"
Text=
"RadComboBoxItem3"
Value=
"RadComboBoxItem3"
/>
</Items>
</telerik:RadComboBox>
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
<br />
</ItemTemplate>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenuItem>
<telerik:RadMenuItem runat=
"server"
Text=
"Root RadMenuItem2"
>
</telerik:RadMenuItem>
<telerik:RadMenuItem runat=
"server"
Text=
"Root RadMenuItem3"
>
</telerik:RadMenuItem>
</Items>
</telerik:RadMenu>
Kind regards,
Peter
the Telerik team
If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now.
0

Shawn
Top achievements
Rank 1
answered on 19 Oct 2012, 07:51 PM
Can you provide an equivalent workaround for Silverlight? I am facing the exact same issue...
Thanks!
Thanks!
0

Shawn
Top achievements
Rank 1
answered on 19 Oct 2012, 09:16 PM
Found the solution here:
http://www.telerik.com/community/forums/silverlight/menu/add-radcombobox-as-child-of-menuitem.aspx
http://www.telerik.com/community/forums/silverlight/menu/add-radcombobox-as-child-of-menuitem.aspx