HeaderContextMenu Height?

6 posts, 0 answers
  1. Golem
    Golem avatar
    21 posts
    Member since:
    Jun 2008

    Posted 22 Jan 2009 Link to this post

    We have a RadGrid with a large number of columns.  I have set EnableHeaderContextMenu to True in order to let the user show/hide columns.  The number of columns in the menu ends up making it stretch too far beyond the boundaries of the monitor, with no way to scroll down to see the items at the bottom of the menu.

    Is there a way to set the height of this menu and have it scroll as well?


  2. Georgi Krustev
    Georgi Krustev avatar
    3687 posts

    Posted 26 Jan 2009 Link to this post

    Hi Joe,

    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"
                    <DefaultGroupSettings Width="100px" Height="100px"/> 

    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.
  3. DevCraft R3 2016 release webinar banner
  4. Andrew
    Andrew avatar
    70 posts
    Member since:
    Oct 2008

    Posted 30 Jan 2009 Link to this post


    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.

  5. Georgi Krustev
    Georgi Krustev avatar
    3687 posts

    Posted 03 Feb 2009 Link to this post

    Hello 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.
  6. Courtney
    Courtney avatar
    13 posts
    Member since:
    Apr 2007

    Posted 26 Apr in reply to Georgi Krustev Link to this post

    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.



  7. Maria Ilieva
    Maria Ilieva avatar
    4017 posts

    Posted 29 Apr Link to this post

    Hello 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.

    Maria Ilieva
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
DevCraft R3 2016 release webinar banner