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

Header Width of Edit Form

1 Answer 53 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Nick Smith
Top achievements
Rank 1
Nick Smith asked on 04 May 2010, 12:04 AM
This should be easy but I just can't figure it out, how do I control the width of the lables in radgrid edit form so that they don't wrap?

1 Answer, 1 is accepted

Sort by
0
Accepted
Shinu
Top achievements
Rank 2
answered on 04 May 2010, 08:56 AM

Hi Nick,

If you want to set fixed width for some columns when grid in editmode, then try the following code, when setting TableLayout to Fixed.

C#:

 
    protected void RadGrid1_ItemDataBound(object sender, GridItemEventArgs e)  
    {  
        if (e.Item is GridEditFormItem && e.Item.IsInEditMode)  
        {  
            GridColumn column = (GridColumn)RadGrid1.MasterTableView.GetColumn("CustomerID");  
            column.HeaderStyle.Width = Unit.Pixel(1000);  
        }  
    } 

-Shinu

Tags
Grid
Asked by
Nick Smith
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or