Hello,
I am working on a project with RadMenu.
Inside the RadMenu’s Drop-Down area there is a DatePicker and a Button.
When the user clicks the RadMenu, it opens a Drop-Down, and when the user clicks anywhere else the Drop-Down is closed.
When the user clicks on the DatePicker calendar to select a date, in an area outside of the Drop-Down, it closes.
How do I fix this problem? [see video]
Code:
Thanks,
Daniel
I am working on a project with RadMenu.
Inside the RadMenu’s Drop-Down area there is a DatePicker and a Button.
When the user clicks the RadMenu, it opens a Drop-Down, and when the user clicks anywhere else the Drop-Down is closed.
When the user clicks on the DatePicker calendar to select a date, in an area outside of the Drop-Down, it closes.
How do I fix this problem? [see video]
Code:
function
ExternalitemOpened(s, e) {
if
($telerik.isIE8) {
// Fix an IE 8 bug that causes the list bullets to disappear (standards mode only)
$telerik.$(
"li"
, e.get_item().get_element())
.each(
function
() {
this
.style.cssText =
this
.style.cssText; });
}
}
function
External_MouseOver(sender, args) {
if
(args.get_item().get_parent() == sender) {
sender.set_clicked(
false
);
}
}
function
ExternalOnClientItemClicking(sender, args) {
if
(args.get_item().get_isOpen() ==
true
) {
args.set_cancel(
true
);
args.get_item().close();
}
else
{
args.set_cancel(
true
);
args.get_item().open();
}
}
<
telerik:RadMenu
ID
=
"GridMenu_Save"
runat
=
"server"
ClickToOpen
=
"True"
EnableShadows
=
"True"
OnClientItemOpened
=
"ExternalitemOpened"
OnClientItemClicking
=
"ExternalOnClientItemClicking"
OnClientMouseOut
=
"External_MouseOver"
Style
=
"top: 0px; left: -2px; z-index: 100; height: 35px;"
Skin
=
"WebBlue"
>
<
Items
>
<
telerik:RadMenuItem
PostBack
=
"true"
Text
=
"save"
Value
=
"Save"
CssClass
=
"btn btn-primary btn-menu-grid-size"
>
<
ContentTemplate
>
<
div
id
=
"Save_panel"
class
=
"GridMenu_panel"
>
<
telerik:RadDatePicker
ID
=
"DatePicker_Save"
runat
=
"server"
></
telerik:RadDatePicker
>
<
br
/>
<
telerik:RadButton
ID
=
"btn_Save"
runat
=
"server"
Text
=
"save"
Skin
=
"Web20"
CssClass
=
"btn_Sort"
></
telerik:RadButton
>
<
br
/>
</
div
>
</
ContentTemplate
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
IsSeparator
=
"true"
></
telerik:RadMenuItem
>
</
Items
>
</
telerik:RadMenu
>
Thanks,
Daniel