I am working with a C# Winforms application. In my application I am setting the theme for it using a method.
Everything works but the bunifuDataGridView(dataGridview, dataGridView1) doesn't get the new header style selection back color.
I tried by asking chat gpt but it was more stupid than I am
dataGridView1.CurrentTheme.HeaderStyle.BackColor = ThemeColor.PrimaryColor;
dataGridView1.CurrentTheme.HeaderStyle.SelectionBackColor = ThemeColor.SecondaryColor;
dataGridView.CurrentTheme.HeaderStyle.BackColor = ThemeColor.PrimaryColor;
dataGridView.CurrentTheme.HeaderStyle.SelectionBackColor = ThemeColor.SecondaryColor;
I am calling this method from the form load event. I did set "Allow custom theming" to true.
Only the headerStyle.selectionBackcolor doesn't work.
If someone knows how to solve it - please help me.
Have a look at this code and call styleDGV in on Form load