Gridview BestFitColumns

5 posts, 0 answers
  1. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 21 Oct 2009 Link to this post

    I use an unbound radgridview. After initialization of the columns i have an empty radgridview.

    When i now call radgridview1.MasterGridViewTemplate.BestFitColumns( );

    then the column header is ignored in the calculation of the best size for the columns and all columns are shrunken to a few pixels.

    Kind Regards,

    Ramius 

  2. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 21 Oct 2009 Link to this post

    Hi Ramius,

    When there are no rows in RadGridView it uses the header text to determine the optimal column width. If it is empty, the column will shrink to its minimal width. Please, could you confirm that this is the case? If not, send us a small application that reproduces the issue. This will help us to locate it and address it for the next release.

    I am looking forward to your reply.

    Kind regards,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
  3. UI for WinForms is Visual Studio 2017 Ready
  4. Ramius
    Ramius avatar
    127 posts
    Member since:
    Feb 2008

    Posted 21 Oct 2009 Link to this post

    Hello Jack,

    no i can't confirm this. 

    When i expand a shrunken column i can see the column header text.

    I will send you an example.

    Kind regeards,

    Ramius

  5. Kirk Couser
    Kirk Couser avatar
    26 posts
    Member since:
    Apr 2009

    Posted 21 Oct 2009 Link to this post

    I had switch out this line of code:

    gridFileVersions.MasterGridViewTemplate.BestFitColumns();

    with this one:

    gridFileVersions.MasterGridViewTemplate.AutoSizeColumnsMode = GridViewAutoSizeColumnsMode.Fill;

    in order for my columns to autosized after upgrading from the Q2 2009 release to the Q3 2009 Beta.



  6. Jack
    Admin
    Jack avatar
    2335 posts

    Posted 22 Oct 2009 Link to this post

    Hi Kirk,

    Thank you for your feedback. Yes, I confirm that the issue exists. Currently we are working on it and it will be addressed in the final release(beginning of November). If you have any other questions, don't hesitate to write back.

    Greetings,
    Jack
    the Telerik team

    Instantly find answers to your questions on the new Telerik Support Portal.
    Watch a video on how to optimize your support resource searches and check out more tips on the blogs.
Back to Top
UI for WinForms is Visual Studio 2017 Ready