This is a migrated thread and some comments may be shown as answers.

RadGridview Excel filter box has tiny elements

6 Answers 163 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Evan
Top achievements
Rank 1
Evan asked on 23 Jul 2018, 02:41 AM

Hi all- 

I'm using a RadGridview (Telerik Winforms version 2018.1.220.40) and am having trouble getting the excel filter grid to look right.   The radGridView seems to default to Seguoi 8.5 font, but I increased that to 14 to make it readable.   The problem I'm having is that, after I enable Excel filtering, when a user chooses to filter, the excel filter box is tiny (I think it's still 8.5 font) - all the checkboxes are tiny, and the titles are unreadable.  

I've searched the forums and found some related posts that instruct in (c#) to run through the elements in the viewCellEditing event, but, either I haven't translated them right into VB, or they aren't doing what I expected.   

 

6 Answers, 1 is accepted

Sort by
0
Evan
Top achievements
Rank 1
answered on 23 Jul 2018, 02:47 AM

(Accidentally posted that before it's complete.)   Anyway, I'm working in VB.net.   Is there a way to set the default font size for the ExcelFiltering pop up, in either code, or in the Designer UI?   

My only code setings added so far are: 

            Me.MyGrid.EnableFiltering = True
            MyGrid.MasterTemplate.ShowHeaderCellButtons = True
            MyGrid.MasterTemplate.ShowFilteringRow = False

Thanks,

0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 23 Jul 2018, 10:36 AM
Hello, Evan,    

The RadGridView.CellFormatting event is the appropriate place to customize the grid cells. However, if you need to change the font of the Excel-like filter popup you can use the following code snippet:

Private Sub RadForm1_Load(sender As Object, e As EventArgs) Handles MyBase.Load
    Me.RadGridView1.EnableFiltering = True
    Me.RadGridView1.MasterTemplate.ShowHeaderCellButtons = True
    Me.RadGridView1.MasterTemplate.ShowFilteringRow = False
 
    AddHandler Me.RadGridView1.FilterPopupInitialized, AddressOf Grid_FilterPopupInitialized
    Me.RadGridView1.Font = f
End Sub
 
Dim f As New Font("Arial", 10, FontStyle.Italic)
Private Sub Grid_FilterPopupInitialized(sender As Object, e As Telerik.WinControls.UI.FilterPopupInitializedEventArgs)
    Dim popup As RadListFilterPopup = TryCast(e.FilterPopup, RadListFilterPopup)
    popup.Font = f
    RemoveHandler popup.MenuTreeElement.TreeView.NodeFormatting, AddressOf NodeFormatting
    AddHandler popup.MenuTreeElement.TreeView.NodeFormatting, AddressOf NodeFormatting
End Sub
 
Private Sub NodeFormatting(sender As Object, e As TreeNodeFormattingEventArgs)
    e.NodeElement.ContentElement.Font = f
End Sub

I hope this information helps. If you have any additional questions, please let me know.  
 
Regards,
Dess
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.
0
Evan
Top achievements
Rank 1
answered on 23 Jul 2018, 12:08 PM
That works perfectly.   Thanks Dess!
0
Evan
Top achievements
Rank 1
answered on 29 Jul 2018, 08:04 PM

Hi Dess (or Telerik support...)

The above code is working great, thanks again.   The only small issue remaining is that the Sort options (when you right click the column headers) and the ExcelFilter's "Available Filters" popup menu still seem to be using the 8pt font rather than the 14 that everything else (grid, excelfilter popup etc.)  uses.. .    Is there an equivalent snippet to set these two areas?   

--(the popup when right clicking column that shows sorting options eg- sort ascending, sort descending, clear sort etc.) 

--(the excelfilters "available filters" popup that shows 'Equals, Not Equals, etc...) 

Thanks again! 

0
Evan
Top achievements
Rank 1
answered on 30 Jul 2018, 02:22 PM
(moved this question to its own thread...)
0
Dess | Tech Support Engineer, Principal
Telerik team
answered on 31 Jul 2018, 07:14 AM
Hello, Evan,    

Your question has already been answered in the other thread you have opened on the same topic. Please, see our answer there for more information.
We kindly ask you to use just one thread for a specific problem to contact us. Posting the same questions numerous times slows down our response time because we will need to review and address two or more tickets instead of one. Moreover, threads are handled according to license and time of posting, so if it is an urgent problem, we suggest you use a support ticket, which would be handled before a forum thread.

Thank you for your understanding.

Regards,
Dess
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Tags
GridView
Asked by
Evan
Top achievements
Rank 1
Answers by
Evan
Top achievements
Rank 1
Dess | Tech Support Engineer, Principal
Telerik team
Share this question
or