telerikDataGrid:RadDataGrid Header Bg & Text color change

1 Answer 241 Views
DataGrid
Chiran
Top achievements
Rank 1
Iron
Iron
Chiran asked on 02 Aug 2021, 09:40 AM

Hot to change the grid header background & text colour,

Please give me a solution 

1 Answer, 1 is accepted

Sort by
0
Didi
Telerik team
answered on 02 Aug 2021, 10:54 AM

DataGrid Styling section in our documentation describes the styling options you can apply to the DataGrid control https://docs.telerik.com/devtools/xamarin/controls/datagrid/theming-and-styles/datagrid-columns-styling

Styling for the header can be applied per column using the Colum's HeaderStyle property https://docs.telerik.com/devtools/xamarin/controls/datagrid/theming-and-styles/datagrid-columns-styling#headerstyle 

<telerikGrid:DataGridTextColumn.HeaderStyle>
    <telerikGrid:DataGridColumnHeaderStyle BackgroundColor="LightSkyBlue"
                                           TextColor="Black"
                                           BorderColor="Black" 
                                           BorderThickness="2"/>
</telerikGrid:DataGridTextColumn.HeaderStyle>

Example: https://github.com/telerik/xamarin-forms-sdk/blob/master/XamarinSDK/SDKBrowser/SDKBrowser/Examples/DataGridControl/StylingCategory/ColumnsStylingExample/ColumnsStyling.xaml 

Check our DataGRid documentation for different Datagrid features and examples described: https://docs.telerik.com/devtools/xamarin/controls/datagrid/datagrid-overview 

Regards,
Didi
Progress Telerik

Love the Telerik and Kendo UI products and believe more people should try them? Invite a fellow developer to become a Progress customer and each of you can get a $50 Amazon gift voucher.

Chiran
Top achievements
Rank 1
Iron
Iron
commented on 02 Aug 2021, 11:26 AM

Thanks, Didi, previously I tried a different way...
Tags
DataGrid
Asked by
Chiran
Top achievements
Rank 1
Iron
Iron
Answers by
Didi
Telerik team
Share this question
or