How to Change Data Font of Filter PopUp

3 posts, 0 answers
  1. Zan
    Zan avatar
    19 posts
    Member since:
    Feb 2017

    Posted 02 Dec 2017 Link to this post

    Hello Telerik Team,

    I'm using Excel-like filtering feature of RadGridView. I need to change font in PopUp.

  2. Dimitar
    Admin
    Dimitar avatar
    2684 posts

    Posted 04 Dec 2017 Link to this post

    Hi  AungKo,

    You can use the FilterPopupInitialized event to access the popup and subscribe to the NodeFormatting event of the tree view:
    private void RadGridView1_FilterPopupInitialized(object sender, FilterPopupInitializedEventArgs e)
    {
        RadListFilterPopup popup = e.FilterPopup as RadListFilterPopup;
        if (popup != null)
        {
            popup.MenuTreeElement.TreeView.NodeFormatting -= TreeView_NodeFormatting;
            popup.MenuTreeElement.TreeView.NodeFormatting += TreeView_NodeFormatting;
        }
    }
     
    Font font = new Font("Segoe Script", 9, FontStyle.Regular);
     
    private void TreeView_NodeFormatting(object sender, TreeNodeFormattingEventArgs e)
    {
     
        e.NodeElement.ContentElement.Font = font;
       
    }

    I hope this will be useful. Let me know if you have additional questions.

    Regards,
    Dimitar
    Progress Telerik
    Try our brand new, jQuery-free Angular components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
  3. Zan
    Zan avatar
    19 posts
    Member since:
    Feb 2017

    Posted 04 Dec 2017 Link to this post

    Thank Dimitar, your solution was useful.
Back to Top