change color and font of context menu in radgridview

3 posts, 1 answers
  1. manizheh
    manizheh avatar
    3 posts
    Member since:
    Jun 2016

    Posted 01 Jul Link to this post

    When you filter a column on radgridview , a context menu is displayed,which contions a list of items like "no filter", "is null", "not null","Start with" ,"custom" and ...

    I wan to change font of it. How can I do?

     

  2. Answer
    Dimitar
    Admin
    Dimitar avatar
    1404 posts

    Posted 01 Jul Link to this post

    Hi Manizheh,

    Thank you for writing.

    The filter drop down is actually a context menu. So you can use the context menu ContextMenuOpening event to change its font:
    Font font = new Font("Segoe Script", 11, FontStyle.Regular);
    private void RadGridView1_ContextMenuOpening(object sender, ContextMenuOpeningEventArgs e)
    {
        if (e.ContextMenuProvider is GridFilterCellElement)
        {
            e.ContextMenu.Font = font;
        }
    }

    Please let me know if there is something else I can help you with. 
     
    Regards,
    Dimitar
    Telerik
    Check out the Windows Forms project converter, which aids the conversion process from standard Windows Forms applications written in C# or VB to Telerik UI for WinForms.For more information check out this blog post and share your thoughts.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. manizheh
    manizheh avatar
    3 posts
    Member since:
    Jun 2016

    Posted 01 Jul in reply to Dimitar Link to this post

    thanks. yes.it is worked.
Back to Top