5 Answers, 1 is accepted
0
Accepted
Princy
Top achievements
Rank 2
answered on 15 Oct 2009, 04:34 AM
Hello Mario,
I suppose you want to change the width of the column in the childtable of a grid dynamically. If so, you can try out the following code:
c#:
RadGrid1.MasterTableView.DetailTables[0].GetColumn("ColumnUniqueName").HeaderStyle.Width = Unit.Pixel(100);
Thanks
Princy.
I suppose you want to change the width of the column in the childtable of a grid dynamically. If so, you can try out the following code:
c#:
RadGrid1.MasterTableView.DetailTables[0].GetColumn("ColumnUniqueName").HeaderStyle.Width = Unit.Pixel(100);
Thanks
Princy.
0
Mario
Top achievements
Rank 1
answered on 15 Oct 2009, 03:50 PM
Thanks Princy,
That was what I was looking for
Just as a comment for anyone else running into this, I placed this code on the
That was what I was looking for
Just as a comment for anyone else running into this, I placed this code on the
grid_ColumnCreated(), since the columns are autogenerated, the columns are not available until this point, just in case someone try to reference it from the OnInit() or sort of those methods
Regards and thanks again for your support
0
Wendy Hunt
Top achievements
Rank 2
answered on 04 Jan 2010, 08:17 PM
Hi Princy -
What if I wanted to resize a column that is just a row of Select Buttons/Links?
These buttons will be directing the user to other pages of data.
Thanks!
wen
What if I wanted to resize a column that is just a row of Select Buttons/Links?
| <telerik:GridButtonColumn ButtonType="LinkButton" Text="Select"></telerik:GridButtonColumn> |
Thanks!
wen
0
Princy
Top achievements
Rank 2
answered on 05 Jan 2010, 05:56 AM
Hello Wendy,
You can either set the size for the ButtonColumn declaratively:
aspx:
or set the size dynamically:
c#:
Thanks
Princy.
You can either set the size for the ButtonColumn declaratively:
aspx:
| <telerik:GridButtonColumn ButtonType="LinkButton" UniqueName="ButtonColumn" Text="Select"> |
| <HeaderStyle Width="100px"/> |
| </telerik:GridButtonColumn> |
or set the size dynamically:
c#:
| RadGrid1.MasterTableView.GetColumn("ButtonColumn").HeaderStyle.Width = Unit.Pixel(400); |
Thanks
Princy.
0
Wendy Hunt
Top achievements
Rank 2
answered on 05 Jan 2010, 03:30 PM
Thanks Princy! It worked.
wen
wen