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. Image for the cookie policy date

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

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

3 Replies

ES Elangovan S Syncfusion Team 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


PA Pavel A.Vinogradov 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>


ES Elangovan S Syncfusion Team 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

Loader.
Live Chat Icon For mobile
Up arrow icon