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

Fixed-width and dymanic-width columns in a single RadGrid

3 Answers 239 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Randall
Top achievements
Rank 2
Randall asked on 21 Oct 2008, 08:12 PM
Hello,

I am using RadControls for ASP.NET AJAX v2008.1.619.20 as the only grid on a page.  Can I have both fixed-width and dymanic-width columns in the same grid?

So if I resize the grid, some columns stay a fixed-width but other columns can expand/contract as necessary.

Thanks,

Randall Price

3 Answers, 1 is accepted

Sort by
0
Accepted
Dimo
Telerik team
answered on 22 Oct 2008, 08:04 AM
Hi Randall,

Yes, please set

TableLayout="Fixed"

for the MasterTableView and widths to some columns, according to your prefenrece.


Kind regards,
Dimo
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Accepted
Princy
Top achievements
Rank 2
answered on 22 Oct 2008, 08:08 AM
Hello  Randall,

You can aslo try setting the Rezisable property to false for those columns which you do not want to resize as shown below.
aspx:
<telerik:GridBoundColumn Resizable="false" DataField="Countries" HeaderText="Countries" UniqueName="Countries"
</telerik:GridBoundColumn>   

Thanks
Princy.
0
Randall
Top achievements
Rank 2
answered on 22 Oct 2008, 07:27 PM
Thank You Dimo and Princy,

Your suggestions worked but only when combined.

I already had TableLayout="Fixed" in my MasterTableView, but all columns had specific widths defined, thus the grid was always a constant size.  So I put specific widths only on the columns I do NOT want to resize and left the columns I do want to resize with no width attribute.  Doing this alone did not quite work without the Resizable="false" setting on the columns I do NOT want to resize.

Thank you both.  My RadGrid is now behaving as I want.

Thanks,

Randall Price
Tags
Grid
Asked by
Randall
Top achievements
Rank 2
Answers by
Dimo
Telerik team
Princy
Top achievements
Rank 2
Randall
Top achievements
Rank 2
Share this question
or