Radgrid static headers and column widths

5 posts, 0 answers
  1. Paul
    Paul avatar
    16 posts
    Member since:
    Feb 2016

    Posted 03 Oct Link to this post

    I found UseStaticHeaders="true", which is what I needed. Static headers. This is great. But, when using static headers, my column widths seem to be ignored and are set to seemingly random values. I need both static headers AND fixed column widths! Is this possible?
  2. Paul
    Paul avatar
    16 posts
    Member since:
    Feb 2016

    Posted 03 Oct Link to this post

    Apparently, the ItemStyle-Width and HeaderStyle-Width properties of radgrid columns essentially specify a minimum with, and not a maximum, or fixed. I want my radgrid to be 100% width of the radwindow which contains it, but this window is sizable. The radgrid has several columns which will contain data the length of which is predictable. Two numeric characters, for example. I want these columns to be FIXED in width. I don't want them to "grow" in width when I increase the size of the radwindow. Can't seem to do it if I have static headers turned on.

    -Paul

    (IIS 7.5, Windows Server 2012, VS 2012, C#, ASP.NET, Telerik runtime version 4.0.30319, IE11, Firefox 45.0)

  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 06 Oct Link to this post

    Hello Paul,

    I am afraid min-width for RadGrid columns is not supported. You can either set explicit widths to all columns, or arrange the page layout in such a way, that the whole RadGrid control does not shrink beyond a certain width (e.g. set min-width to its container).

    Regards,
    Kostadin
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
  5. Paul
    Paul avatar
    16 posts
    Member since:
    Feb 2016

    Posted 06 Oct Link to this post

    I'm not looking for a minimum width! I want a FIXED width. Apparently it is not possible to have FIXED column widths if you turn on static headers AND specify the radgrid's overall width to be 100% of the div that holds it. So now I'm using percent values for column widths, which is not what I wanted but it's as close as I can get with a radgrid.
  6. Kostadin
    Admin
    Kostadin avatar
    1711 posts

    Posted 11 Oct Link to this post

    Hi Paul,

    I prepared a small sample where you can see that a fixed width of the column is working correctly with static headers. Could you please check out the attached sample and let me know how it differs from your real setup?

    Regards,
    Kostadin
    Telerik by Progress
    Do you need help with upgrading your ASP.NET AJAX, WPF or WinForms projects? Check the Telerik API Analyzer and share your thoughts.
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017