Telerik Forums
UI for Xamarin Forum
1 answer
255 views

How to common the grid header styles (Dark & light), by repeating each column header for light & dark theme it'll increase the number of code, need to common all headers styles.

please give me a solution...

Thanks...

<telerikDataGrid:DataGridTextColumn.HeaderStyle>
    <AppThemeBinding>
        <AppThemeBinding.Light>
            <telerikDataGrid:DataGridColumnHeaderStyle 
                    BackgroundColor="#ffffff"
                    BorderColor="#F0EFF3"
                    BorderThickness="1"/>
        </AppThemeBinding.Light>
        <AppThemeBinding.Dark>
            <telerikDataGrid:DataGridColumnHeaderStyle 
                    BackgroundColor="#2a3137"
                    BorderColor="#505d68"
                    BorderThickness="1"/>
        </AppThemeBinding.Dark>
    </AppThemeBinding>
</telerikDataGrid:DataGridTextColumn.HeaderStyle>

 

Didi
Telerik team
 answered on 22 Sep 2021
1 answer
520 views

I just used the approach outlined in the link below to set a custom color for the selected row in my RadGridView control.

WPF DataGrid | SelectedBackground and MouseOverBackground | Telerik UI for WPF

This approach seems to have worked just fine for the case when the user clicks on a row to select it.  However, when the SelectedItem property of the grid view is set in code through data binding, the selected row color reverts to the default value.  Only upon clicking the row again does it display using the color that I defined.

Am I missing something?

Thanks!

Stenly
Telerik team
 answered on 13 Jul 2021
Top users last month
Patrick
Top achievements
Rank 1
Iron
Iron
Iron
MIS
Top achievements
Rank 1
Ross
Top achievements
Rank 1
Marcin
Top achievements
Rank 1
Iron
Iron
Sean
Top achievements
Rank 2
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?