This is a migrated thread and some comments may be shown as answers.

Modifying Column Width of Autogenerated Column

1 Answer 71 Views
TreeList
This is a migrated thread and some comments may be shown as answers.
shabbir mohammad
Top achievements
Rank 1
shabbir mohammad asked on 09 May 2011, 04:52 PM
Hi

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.

Thanks

1 Answer, 1 is accepted

Sort by
0
Tsvetina
Telerik team
answered on 12 May 2011, 10:16 AM
Hi,

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);
    }
}

Regards,
Tsvetina
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.

Tags
TreeList
Asked by
shabbir mohammad
Top achievements
Rank 1
Answers by
Tsvetina
Telerik team
Share this question
or