Hi all,
I create a column of type GridDateTimeColumn dynamically and add to my grid.
When I go in Edit mode, the width of the textbox control is too wide (default size) as I display and user only short dates(dd/mm/yyyy)...
In order to resize the control I subscribe to the CreateColumnEditor event on radgrid and change the TextBoxStyle.Width, at this moment the textbox control has a strange behavior ... In facts, it seems that the radgrid resize automatically the width of the textbox control to the width of the text...
Does anyone have an idea?
Thanks
I create a column of type GridDateTimeColumn dynamically and add to my grid.
When I go in Edit mode, the width of the textbox control is too wide (default size) as I display and user only short dates(dd/mm/yyyy)...
In order to resize the control I subscribe to the CreateColumnEditor event on radgrid and change the TextBoxStyle.Width, at this moment the textbox control has a strange behavior ... In facts, it seems that the radgrid resize automatically the width of the textbox control to the width of the text...
private static void CreateColumnEditorEventHandler(object sender, GridCreateColumnEditorEventArgs e) |
{ |
if (e.ColumnEditor is GridDateTimeColumnEditor) |
{ |
((GridDateTimeColumnEditor)e.ColumnEditor).TextBoxStyle.Width = Unit.Pixel(50); |
} |
} |
Does anyone have an idea?
Thanks