We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

How to assign same font family and size to all parts of sfDataGrid

Thread ID:

Created:

Updated:

Platform:

Replies:

120152 Sep 5,2015 04:00 PM UTC Sep 8,2015 12:17 PM UTC WPF 3
loading
Tags: SfDataGrid
Pavel A.Vinogradov
Asked On September 5, 2015 04:00 PM UTC

Hi!

Сould you help me to create style, which assigns FontFamily and FontSize of sfDataGrid to all parts of it, including header, grouping and total cells, filter popup windows, etc. ?

Thank you very much!

Pavel

Elangovan S [Syncfusion]
Replied On September 7, 2015 10:17 AM UTC

Hi Pavel,

Thank you for using Syncfusion product,

As per your requirement, it is possible to create a common style resource for Font Family and Font Size. But as per control parts the style property will be different.

Code Example for Common Style Resource:


     <Style x:Key="gridStyle">

         <Setter Property="Control.FontFamily" Value="Times New Roman"/>

         <Setter Property="Control.FontSize" Value="17"></Setter>

     </Style>




Please find the below style property as per control parts,

Control Parts

Property

Header

HeaderStyle

Grouping

CaptionSummaryRowStyle

Table Summary

TableSummaryRowStyleSelector

Filter Popup

FilterPopupStyle


For more details, you can download the sample from the following location.

Sample Link:
http://www.syncfusion.com/downloads/support/forum/120152/ze/SfDataGridDemo2107680687

Please let us know if you have any more query.

Regards,
Elangovan S

Pavel A.Vinogradov
Replied On September 7, 2015 02:07 PM UTC

Hi! 

Thank you very much for your quick answer!
This example was very useful, but assigning FilterPopupStyle doesn't changing font of SortButtons, CheckboxFilterControl and AdvancedFilterControl. 
I created 3 extra styles, and last elements, that didn't change FontFamily (but FontSize changed) are comboboxes in AdvancedFilterControl.
How can I change FontFamily for this comboboxes ?

Pavel

    <Style TargetType="{x:Type Syncfusion:SortButton}">
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="FontSize" Value="11"/>
    </Style>

    <Style TargetType="{x:Type Syncfusion:CheckboxFilterControl}">
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="FontSize" Value="11"/>
    </Style>

    <Style TargetType="{x:Type Syncfusion:AdvancedFilterControl}">
        <Setter Property="FontFamily" Value="Verdana"/>
        <Setter Property="FontSize" Value="11"/>
    </Style>

Elangovan S [Syncfusion]
Replied On September 8, 2015 12:17 PM UTC

Hi Pavel,
We were able to reproduce the reported issue and have logged defect report regarding this. A support incident to track the status of this defect has been created under your account. Please log on to our support website to check for further updates
https://www.syncfusion.com/account/login?ReturnUrl=%2fsupport%2fdirecttrac%2fincidents
Please let me know if you have any question.
Regards,
Elangovan S

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;