Hello,
I use the method ResizToFit to resize all columns in event gridCreated but it doesn't work correctly for the GridTemplateColumn.
The code is:
aspx:
<telerik:GridTemplateColumn UniqueName="EmailSendDate" HeaderText="Sent: "><ItemTemplate> <asp:Label runat="server" ID="lblSendStatus" /></ItemTemplate>
<ItemStyle Wrap="True" HorizontalAlign="Left" /><AlternatingItemStyle Wrap="True" HorizontalAlign="Left" /><HeaderStyle Wrap="False" HorizontalAlign="Left" /><FooterStyle Wrap="False" HorizontalAlign="Left" /><ClientSettings EnableRowHoverStyle="True" AllowKeyboardNavigation="True"> <Selecting AllowRowSelect="True"/> <ClientEvents OnGridCreated="gridCreated" /> <Scrolling AllowScroll="true" UseStaticHeaders="True" ScrollHeight="475px"/> <Resizing AllowColumnResize="True" ClipCellContentOnResize="False" AllowResizeToFit="True" EnableRealTimeResize="False" ResizeGridOnColumnResize="False" /> <ClientMessages ColumnResizeTooltipFormatString="" DragToResize="" /></ClientSettings>The label may contain nothing or a datetime or an error text.
javascript:
var columns = Grid.get_masterTableView().get_columns();for (var i = 0; i < columns.length; i++) { columns[i].resizeToFit();}When the column contain the datetime, the column is cut between the date and the time. When I manually enlarged column, just a little, it's ok (The time come beside the date).
Any suggestions?
Thanks in advance
Seb