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

Auto GridExpandColumn by NestedViewTemplate

2 Answers 27 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Ahrensberg
Top achievements
Rank 1
Ahrensberg asked on 25 Sep 2009, 09:30 AM
Hi all,

After adding a NestedViewTemplate to my grid, there is automatic added a GridExpandColumn. That it is fine, but how do i define attributes as Width etc., at this column? By adding the <telerik:GridExpandColumn></telerik:GridExpandColumn> for set the settings, there just are added to ExpandColumns...

2 Answers, 1 is accepted

Sort by
0
Accepted
Princy
Top achievements
Rank 1
answered on 25 Sep 2009, 10:34 AM
Hi Ahrensberg,

You can increase the width of the ExpandColumn by using the HeaderStyle property of the column as shown below:
c#:
protected void RadGrid1_ColumnCreated(object sender, Telerik.Web.UI.GridColumnCreatedEventArgs e) 
    { 
        if (e.Column.UniqueName == "ExpandColumn"
            e.Column.HeaderStyle.Width = Unit.Pixel(20);   
    } 

Regards
Princy.
0
Ahrensberg
Top achievements
Rank 1
answered on 28 Sep 2009, 08:03 AM
Thank you! :o)
Tags
Grid
Asked by
Ahrensberg
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 1
Ahrensberg
Top achievements
Rank 1
Share this question
or