Modifying Column Width of Autogenerated Column

2 posts, 0 answers
  1. shabbir mohammad
    shabbir mohammad avatar
    7 posts
    Member since:
    Jan 2010

    Posted 09 May 2011 Link to this post


    I have a treelist with a column holding datetime values. In edit mode I need to show the datetime selection control. But the problem I am facing is that the width of the column is not wide enough to make the  datetime selection cotrol visible.

    Now my question is, how can I manipulate the width of the auto generated column

    Any help on the regard will be highly appreciated.

  2. Tsvetina
    Tsvetina avatar
    2102 posts

    Posted 12 May 2011 Link to this post


    In order to modify the look of the autogenerated columns of RadTreeList you can intercept the AutoGeneratedColumnCreated event of the control, recognize the columns by UniqueName and apply the respecive settings:
    protected void RadTreeList1_AutoGeneratedColumnCreated(object sender, TreeListAutoGeneratedColumnCreatedEventArgs e)
        if (e.Column.UniqueName == "ReportsTo")
            e.Column.HeaderStyle.Width = Unit.Pixel(300);

    the Telerik team

    Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

Back to Top