Unplanned
Last Updated: 05 Aug 2016 07:56 by ADMIN
ADMIN
Dimitar
Created on: 12 Jul 2016 08:54
Category: GridView
Type: Bug Report
0
FIX. RadGridView - The DateTime editor text is cut off when the rows has smaller size and the Windows 7 theme is used.
To reproduce:
- Add DateTime column and set the RowHeight to 20.
- Set the theme to Windows7.
- The text is not visible when the editor is shown.

Workaround:
private void RadGridView2_CellEditorInitialized(object sender, GridViewCellEventArgs e)
{
    RadDateTimeEditor editor = e.ActiveEditor as RadDateTimeEditor;
    if (editor != null)
    {
        var element = editor.EditorElement as RadDateTimeEditorElement;
        element.Font = new Font("Segoe UI", 8, FontStyle.Regular);
        element.Children[1].Visibility = ElementVisibility.Collapsed;
        element.TextBoxElement.ShowBorder = false;        
        element.TextBoxElement.TextBoxItem.HostedControl.MinimumSize = new Size(0, 12);
    }
}
0 comments