New to Telerik UI for ASP.NET AJAX? Download free 30-day trial


This method resizes the column to fit the widest cell's content without wrapping. It also provides two optional parameters which can be used for further alteration:

  • skipHeaderCell: Determines whether the Headers should be ignored in the calculation for the column's new width.By default - false.

  • includeAllHeaderRows: This parameter has effect only if the skipHeaderCell is set to false. It determines whether the cells of the filter item should be considered in the calculation for the column's new width.By default - false, except when the RadGrid has structure with Multi-column headers configured.

<telerik:RadCodeBlock ID="RadCodeBlock1" runat="server">
<script type="text/javascript">
    function pageLoad() {
        var grid = $find("<%= RadGrid1.ClientID %>");
        var columns = grid.get_masterTableView().get_columns();
        for (var i = 0; i < columns.length; i++) {
            columns[i].resizeToFit(false, true);
<telerik:RadGrid RenderMode="Lightweight" id="RadGrid1" runat="server">
        <Resizing AllowColumnResize="true" ResizeGridOnColumnResize="true" AllowResizeToFit="true" />

See Also

In this article
Not finding the help you need? Improve this article