Completed
Last Updated: 23 Oct 2015 09:26 by ADMIN
ADMIN
Dess | Tech Support Engineer, Sr.
Created on: 03 Sep 2015 10:25
Category: GridView
Type: Bug Report
6
FIX. RadGridView - when switching from one theme to VisualStudio2012Dark, grid editors have white color and the text has the same fore color
To reproduce:

1.Add a grid and populate it with data.
2.Apply a theme to the entire application, e.g. TelerikMetro
3.Activate the grid editor.
4.Change the theme to VisualStudio2012Dark or HigthContrastBlack.
5.Activate the grid editor again. You will notice that editor's back color remains white and you are not able to read the text.

Note: if you apply initially VisualStudio2012Dark theme, editor's back color is correct. Please refer to the attached gif file, illustrating this incorrect style.

Workaround:

private void radGridView1_CellEditorInitialized(object sender, Telerik.WinControls.UI.GridViewCellEventArgs e)
{
    BaseGridEditor gridEditor = e.ActiveEditor as BaseGridEditor;
    if (gridEditor != null)
    {
        RadTextBoxElement el = gridEditor.OwnerElement.FindDescendant<RadTextBoxElement>();
        if (el != null)
        {
            if (ThemeResolutionService.ApplicationThemeName == "VisualStudio2012Dark")
            {
                el.BackColor = Color.Black;
            }
        }
    }
}

0 comments