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

[Solved] change width of expand collapse column

2 Answers 294 Views
Grid
This is a migrated thread and some comments may be shown as answers.
andieje
Top achievements
Rank 1
andieje asked on 15 Jul 2009, 05:32 PM
Hi

I am using the web blue skin from q3 2008. PLease can you tell me how i can make the expand/collapse column smaller in width. I created a custom skin based on the web blue skin and i have tried to make the width smaller like so

.RadGrid_SureTrack

 

.rgExpand

 

{

 

background-position:2px -722px;

 

 

width: 15px;

 

}



but to no avail.

Many thanks

2 Answers, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 16 Jul 2009, 06:27 AM
Hello Andrea,

Try setting the width of the ExpandColumn as shown in the code below:
aspx:
 protected void RadGrid1_ColumnCreated(object sender, GridColumnCreatedEventArgs e) 
    { 
        if (e.Column is GridExpandColumn) 
        { 
            e.Column.HeaderStyle.Width = new Unit(15); 
            e.Column.ItemStyle.Width = new Unit(15);            
             
        }  
    } 

-Princy.
0
Jeff Mikla
Top achievements
Rank 1
answered on 22 Oct 2009, 07:50 PM
I am having a similar problem with re-sizing the width of  the expand/collapse column.  I tried the suggestion of setting the width on the _ColumnCreated event, but the new width I set did not take effect on the page.

I was able to set a different property, the Header Text, of my GridExpandColumn, but not the width.

I am using a simple RadGrid, with a <MasterTableView> and <DetailTables>
Tags
Grid
Asked by
andieje
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Jeff Mikla
Top achievements
Rank 1
Share this question
or