Grid Column Resizing issue

5 posts, 0 answers
  1. Piyush Bhatt
    Piyush Bhatt avatar
    17 posts
    Member since:
    Oct 2014

    Posted 19 Jan 2015 Link to this post

    Hi,

    I am facing column re-sizing issues with Kendo Grid. While re-sizing the column, it is stretching too far.
    You can have look at below example. Each column having some width.
    http://dojo.telerik.com/eFEYI

    can anyone help me?
  2. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 20 Jan 2015 Link to this post

    Hello Piyush,

    All columns have explicit widths, which are too small, and this causes the observed problem. Please refer to the relevant documentation:

    http://docs.telerik.com/kendo-ui/web/grid/appearance#column-widths

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
  3. Kendo UI is VS 2017 Ready
  4. Dani
    Dani avatar
    55 posts
    Member since:
    Jan 2009

    Posted 27 Mar 2015 Link to this post

    Oh! I have a bug that looks exactly the same, but I found that if my rows goes over the "container", I mean, if the horizontal scroll is visible, everything is OK.  If no scroll, but in resize.

    But, I found a fix... if I hide and show a column, some kind of "redraw" is performed, and after that, everything is fine.

    My case: http://dojo.telerik.com/ECAro/13
    Fix found:  (fix button in the test case)

    var grid = $('#grid1').kendoGrid({params...}).data('kendoGrid');
    grid.hideColumn(0);
    grid.showColumn(0);

    If kendo automatically call what is called when we do a show-hide, on the grid creation, it will fix that bug.

  5. Dani
    Dani avatar
    55 posts
    Member since:
    Jan 2009

    Posted 27 Mar 2015 in reply to Piyush Bhatt Link to this post

    quick fix:
    grid.hideColumn(0);
    grid.showColumn(0);
  6. Dimo
    Admin
    Dimo avatar
    8332 posts

    Posted 31 Mar 2015 Link to this post

    Hello Daniel,

    Instead of hiding and showing a column (which is a relatively expensive operation in terms of performance), you can also set a pixel width to the two Grid tables, which corresponds to the sum of all column widths. This is what actually happens when you change a column visibility and all remaining visible columns have widths.

    http://docs.telerik.com/kendo-ui/web/grid/appearance#scrolling

    Regards,
    Dimo
    Telerik
    Join us on our journey to create the world's most complete HTML 5 UI Framework - download Kendo UI now!
Back to Top
Kendo UI is VS 2017 Ready