Last Updated: 26 Mar 2019 09:58 by ADMIN
Created on: 23 Aug 2018 13:50
Category: Grid
Type: Feature Request
Column autofit should be aware of the grid's width
Currently, the auto resize of the the columns does not take the width of the grid into account.  I don't think this is how most users would expect this to work.  The autofit of the columns should be able to resize the columns so that they work as best they can within the grid's bounds.

Now, when I autofit my columns, the first thing I have to do is resize the columns manually so I can see the whole row on the screen.  Since I end up resizing the columns manually anyway, autofit ends up not really helping me much.

Some toolkits I have used have a resize mode for a table which determines whether or not all columns are to always be visible or not.  If all the columns are to always be visible, resizing one column needs to resize the others so that everything still fits.  This "mode" could determine which algorithm autofit should use
Dimiter Topalov
Posted on: 26 Mar 2019 09:55

Thank you for both submitting this feature request, and sharing all the feedback and suggestions.

We will track the customer demand, and consider introducing the discussed enhancement based on the interest, and estimated business value.

On a side note, I also edited the title as mentioned.

Dimiter Topalov
Progress Telerik
Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Posted on: 20 Mar 2019 12:43

If you do try to make some enhancements in this area, here are some ideas I would invite you to consider:

Expose a "measure" method for a column so if someone needs to implement their own algorithm for some reason, they can

Here are some column attributes that I have used when implementing a resize algorithm.  My experience with this is that it was really hard to come up with the a good set of rules.  Good luck!

  • min / max width
  • Allow wrapping
    • Generally Date and Number columns should not wrap, while a text columns are generally can
    • An auto resize algorithm can use this information when figuring out the size it wants to be.
    • If a text column has a lot of text in it, but also has embedded newlines, then its desired width would just be the length of the longest line
  • min / max height
    • If there is a column with a lot of text in it, the height should be limited to a specified number of lines and after that, the text should truncate if the column is too narrow.
    • If there is not a max-height (max rows), then making a text column narrow causes the text to wrap too much, causing the row height to get too large.  When this happens,  the table is no longer very useful.
  • Resize weight (how to proportion extra space)
    • A date column, for instance, usually has values that are all the same length and so it really doesn't need to grow or shrink.


Imported User
Posted on: 27 Aug 2018 09:05
I totally agree with that improvement idea. 
It could also be nice to have the Autofit method bounded to the grid component declaration itself so that the grid is directly built using optimal measures. Instead of first building it with default parameters and after a setTimeout(), build it again with optimal width. 
Posted on: 23 Aug 2018 13:56
Sorry folks, I checked the content of my idea, but didn't check the title:
"Column autofit should be aware of the grid's width"