Is there a way to set the height of this menu and have it scroll as well?
Thanks.
5 Answers, 1 is accepted
To achieve your goal you need to set width or height into DefaultGroupSettings tag. You can find it in the HeaderContextMenu tag, which represents the Context menu displayed after right-click of the mouse.
Here is a code snippet how to attain the functionality you are searching for:
<telerik:RadGrid ID="RadGrid1" runat="server" AllowPaging="True" AutoGenerateColumns="false" |
EnableHeaderContextMenu="True" DataSourceID="SqlDataSource1" GridLines="None"> |
<HeaderContextMenu> |
<DefaultGroupSettings Width="100px" Height="100px"/> |
</HeaderContextMenu> |
.... |
For further information how these settings reflects on the Context menu you can refer to this live demo.
Sincerely yours,
Georgi Krustev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
Thanks for the posting above, I too have been having a problme with many columns.
Yes the posted suggestion improves things, BUT, not that well.
1) Setting the height and width leaves either an ugly amount of empty space on the first menu (below Columns) or makes the list of columns very short.
2) With a short list, and many columns, hovering over the scroll buttons does not work for very long before the sub-menu folds up so I have to make repeated trips to the Columns option to re-open the list (this is in FF, perhaps different in other browsers).
3) Scroll wheel does not work to speed up scrolling
4) Why do we have to set a size? It is better that the list auto-sizes (i.e. few columns means a smaller box), and then scrolls if the window is not large enough.
5) Perhaps several columns of column names would be better.
Andrew
Straight onto your questions:
1) When the value set to the height property is bigger than the number of the columns, it is normal to have this space. The height and the width of the menu can be set to auto sizing, but then there will be no scrolling.
2) This abnormality will be forwarded for further investigation.
3) The scrolling is not supported, because the shown arrows have nothing common with the browser scroll bars. They provide a custom scrolling and that's why we do not override the browser functionality.
4) It is not obligatory to set width or height, but as I said the scrolling will not be shown.
5) This functionality is not supported for now. We will consider your suggestion for the future versions of the product.
Best regards,
Georgi Krustev
the Telerik team
Check out Telerik Trainer, the state of the art learning tool for Telerik products.
This is a response to an old post however we are seeing the same issue with the RadGrid HeaderContextMenu.
We turned on the RadGrid's HeaderContextMenu so that our users can turn on/off columns on the grid.
The grid happens to be on a RadWindow so the space within the window is rather small and we have about 100 columns that the users can select.
Because of the large number of columns, the popup scrolling window that displays the columns goes off the bottom of the Window.
From the post above I see that we can set the <HeaderContextmenu> <DefaultGroupSettings Height="100"> to shrink the size of the columns popup and that does work to resize that window.
However, as the user above discovered, as soon as you set the DefaultGroupSettings height and mouse over the up and down arrows that allow you to scroll through the columns list, the popup window always disappears after about 1 second.
This is the same bug that the user describes in number 2) above.
I have found this same issue in Chrome and Firefox.
So I am left with 2 unacceptable outcomes:
1. Shrink the columns popup list using the DefaultGroupSettings height property but then the user may not be able to select columns before the popup disappears.
2. Don't set the DefaultGroupSettings height and the user will not be able to see all of the columns...actually it turns out they can use the keyboard arrow keys to scroll down the outer window and then use the mouse to scroll the columns popup but many users cannot grasp this functionality.
Courtney
As the current thread is rather old , for better tracking your case I would suggest you to open a separate support ticket and send us sample version of your applictaion that demonstrates the issue. Thus we will be able to revise your code locally and do our best to io9lsate the root cause of the problems you are facing.
Regards,
Maria Ilieva
Telerik