Hi,
I have a menu that is being populated via a web service. It is functioning correctly right now, however, a couple levels deep in the nesting has the items display off the screen. We need to implement a max height on the boxes to prevent this. How would we do this with the control? I have tried using the Group Settings height, however cannot get the desired behavior.
Thanks,
Steve
I have a menu that is being populated via a web service. It is functioning correctly right now, however, a couple levels deep in the nesting has the items display off the screen. We need to implement a max height on the boxes to prevent this. How would we do this with the control? I have tried using the Group Settings height, however cannot get the desired behavior.
Thanks,
Steve
7 Answers, 1 is accepted
0
Cori
Top achievements
Rank 2
answered on 15 Jun 2011, 05:46 PM
Hello Steve,
Have you tried setting EnableAutoScroll and see if that helps. Also, do you have EnableScreenBoundaryDetection turned on?
Have you tried setting EnableAutoScroll and see if that helps. Also, do you have EnableScreenBoundaryDetection turned on?
0
Hi Steve,
Since the issue that you encounter is not a trivial one I would suggest that you open a support ticket and send us a sample runnable project where we can reproduce the issue and help you out with a solution. Providing an image demonstrating the problem would also be very helpful.
Best wishes,
Kate
the Telerik team
Since the issue that you encounter is not a trivial one I would suggest that you open a support ticket and send us a sample runnable project where we can reproduce the issue and help you out with a solution. Providing an image demonstrating the problem would also be very helpful.
Best wishes,
Kate
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
Steve
Top achievements
Rank 1
answered on 16 Jun 2011, 02:34 PM
EnableScreenBoundaryDetection was already on. I EnableAutoScroll = true. but now I just get the popup container cutting off the extra items. I can see they are there, but there is no scroll.
0
Steve
Top achievements
Rank 1
answered on 16 Jun 2011, 02:57 PM
A sample will take me a little while to construct. In the meantime, here is a screenshot of the issue.
0
Hello Steve,
I suitable solution for the issue that you encounter would be the following code (as I already described in the support ticket that you sent). However, since your scenario is a very customized one, and to avoid any confusion, I would suggest that we continue the communication there.
markup
Regards,
Kate
the Telerik team
I suitable solution for the issue that you encounter would be the following code (as I already described in the support ticket that you sent). However, since your scenario is a very customized one, and to avoid any confusion, I would suggest that we continue the communication there.
<script type=
"text/javascript"
>
function
itemOpened(sender, args) {
var
item = args.get_item();
var
childCount = item.get_items().get_count();
var
scrollWrapElement = args.get_item()._getScrollWrapElement();
var
groupHeight = item.get_groupSettings().get_height();
var
itemHeight = item.get_element().offsetHeight;
itemHeight = childCount * itemHeight;
if
(itemHeight < parseInt(groupHeight)) {
scrollWrapElement.style.height = itemHeight +
"px"
;
}
}
</script>
markup
<
telerik:RadMenu
ID
=
"RadMenu1"
runat
=
"server"
EnableRoundedCorners
=
"true"
EnableShadows
=
"true"
OnClientItemPopulated
=
"itemOpened"
>
<
WebServiceSettings
Path
=
"ProductCategories.asmx"
Method
=
"GetMenuCategories"
/>
<
LoadingStatusTemplate
>
<
asp:Image
runat
=
"server"
ID
=
"LoadingImage"
ImageUrl
=
"Images/loading.gif"
ToolTip
=
"Loading..."
Width
=
"16px"
Height
=
"16px"
Style
=
"margin-top: 8px"
/>
</
LoadingStatusTemplate
>
<
Items
>
<
telerik:RadMenuItem
Text
=
"Products"
Value
=
"1"
ExpandMode
=
"WebService"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Purchase"
Value
=
"132"
ExpandMode
=
"WebService"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Support"
Value
=
"141"
ExpandMode
=
"WebService"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Community"
Value
=
"155"
ExpandMode
=
"WebService"
>
</
telerik:RadMenuItem
>
<
telerik:RadMenuItem
Text
=
"Corporate"
Value
=
"164"
ExpandMode
=
"WebService"
>
</
telerik:RadMenuItem
>
</
Items
>
<
DefaultGroupSettings
Height
=
"100px"
/>
</
telerik:RadMenu
>
Regards,
Kate
the Telerik team
Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.
0
jolynice
Top achievements
Rank 1
answered on 28 Sep 2011, 08:25 PM
Hi everyone,
I have the same problem, thereĀ“s a solution?
Thanks,
Jolynice
I have the same problem, thereĀ“s a solution?
Thanks,
Jolynice
0
Hi Jolynice,
Did you try the solution below?
Note that in LoadOnDemand scenarios you should subscribe to the OnClientItemPopulated client-side event.
All the best,
Helen
the Telerik team
Did you try the solution below?
Note that in LoadOnDemand scenarios you should subscribe to the OnClientItemPopulated client-side event.
All the best,
Helen
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