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

4 posts, 2 answers
  1. Randall
    Randall avatar
    54 posts
    Member since:
    Jun 2008

    Posted 21 Oct 2008 Link to this post

    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
  2. Answer
    Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 22 Oct 2008 Link to this post

    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.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Answer
    Princy
    Princy avatar
    17421 posts
    Member since:
    Mar 2007

    Posted 22 Oct 2008 Link to this post

    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.
  5. Randall
    Randall avatar
    54 posts
    Member since:
    Jun 2008

    Posted 22 Oct 2008 Link to this post

    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
Back to Top