How to change column width when using groupby

6 posts, 0 answers
  1. joni
    joni avatar
    23 posts
    Member since:
    Apr 2008

    Posted 30 Apr 2008 Link to this post

    Hi,
    I'm evaluating Telerik products and so far so good - but I have created  a web grid and and it is populated with a dataset.  There are 20 columns so i have it horizontally scroll (I wrapped it in a div and set the overflow to horizontal flow)- it looks great except when I drag a column to the group by header - then my table shrinks to the width with no scrolling and the columns are so narrow I can't read what is in them.
    How can I make it so the grid retains it's scrolling ability and it's column widths?
    Any help is appreciated. Thanks!

    joni
  2. Yavor
    Admin
    Yavor avatar
    11 posts

    Posted 01 May 2008 Link to this post

    Hi joni,

    Based on the information supplied, I suspect that the problem is related to the particular implementation at your end - perhaps with styles/widths applied. In order to further investigate the problem, it would be best if you open a formal support ticket, and send us a small working project, which demonstrates your setup, and displays the unwanted behavior. I will review it locally, and get back to you with my findings.

    Regards,
    Yavor
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. joni
    joni avatar
    23 posts
    Member since:
    Apr 2008

    Posted 02 May 2008 Link to this post

    Yavor,
    Thanks for your response - it seems that the problem was the fixed header set to true.  If I set usefixedHeaders to false the columns will size correctly. I set it to false in the grid_groupschanging event if the action is type group - otherwise I set it to true. Is this normal behavior for groups - that you can use fixed headers? thanks!

    Joni
  5. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 04 May 2008 Link to this post

    Although I have not come upon such oddity when using scrolling, static headers and grouping, my lucky guess is to set TableLayout = Fixed for the master table in the grid to see whether this helps. A trustworthy method to detect what produces the unwanted effect is to inspect the html of the page using IE developer toolbar:

    http://www.microsoft.com/downloads/details.aspx?familyid=e59c3964-672d-4511-bb3e-2d5e1db91038&displaylang=en

    The FF equivalent is FireBug if I remember well:

    https://addons.mozilla.org/en-US/firefox/addon/1843

    Kiara
  6. MB
    MB avatar
    1 posts
    Member since:
    Aug 2008

    Posted 26 Aug 2008 Link to this post

    I've got the exact same problem. When I use the combination UseStaticHeaders="True" and AllowScroll="True" the horizontal scrolling is fine until I group by any field.
    Without the grouping the columns have a width property, but the grouping removes the width so that all columns get squashed into the table without any horizontal scrolling.
  7. Kiara
    Kiara avatar
    309 posts
    Member since:
    Jul 2006

    Posted 26 Aug 2008 Link to this post

    I suppose you tried the suggestions discussed previously and inspected the html of the page using IE dev toobar of FireBug. If this does not bring out any obvious reasons for the discrepancy, contact the Telerik team via the support system submitting a sample demo. They will probably be able to provide more definite answer.

    Kiara
Back to Top
UI for ASP.NET Ajax is Ready for VS 2017