Unplanned
Last Updated: 06 Feb 2017 09:56 by ADMIN
ADMIN
Hristo
Created on: 22 Nov 2016 14:30
Category: GridView
Type: Bug Report
1
FIX. RadGridView - in certain themes the EnableAlternatingRowColor back color is not initially applied if the grid is in unbound mode
The problematic themes are:
Aqua
HighContrastBlack
VisualStudio2012Dark
VisualStudio2012Light
Windows8

How to reproduce:
private void RadForm1_Load(object sender, EventArgs e)
{
    var theme = new Windows8Theme();
    ThemeResolutionService.ApplicationThemeName = "Windows8";

    GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn();
    textBoxColumn.Name = "Test";
    this.radGridView1.Columns.Add(textBoxColumn);

    
    for (int i = 0; i < 100; i++)
    {
        this.radGridView1.Rows.AddNew();
    }
}


Workaround:
private void RadForm1_Load(object sender, EventArgs e)
{
    var theme = new Windows8Theme();
    ThemeResolutionService.ApplicationThemeName = "Windows8";

    GridViewTextBoxColumn textBoxColumn = new GridViewTextBoxColumn();
    textBoxColumn.Name = "Test";
    this.radGridView1.Columns.Add(textBoxColumn);

    this.radGridView1.BeginUpdate();
    for (int i = 0; i < 100; i++)
    {
        this.radGridView1.Rows.AddNew();
    }

    this.radGridView1.EndUpdate();
    int lastRow = this.radGridView1.Rows.Count - 1;
    this.radGridView1.Rows[lastRow].IsCurrent = true;
}
0 comments