Results 1 to 8 of 8

Thread: Inconsistent Grid Width

  1. #1
    Sencha Premium User
    Join Date
    Aug 2014
    Posts
    16

    Default Answered: Inconsistent Grid Width

    Hi!

    I have found that width of the grid differs if there are (no) locked columns. Perhaps it is not a bug however I didn't find a way how it can be fixed correctly. Here is my Fiddle: https://fiddle.sencha.com/#fiddle/b65. I have checked it in Chrome and IE.

    1.png

    Appreciate any help.

  2. I am going to ask the simple question first. If you are setting the width of both, can you set 1 of the widths 1 pixel different?

    If you want to go after the method that calculates the width, have a look at:

    Ext.grid.locking.Lockable :: processColumns where the width is set by the existing column length.
    If you look at the normal grid with the element inspector, the inner-cell is 99, where the locked is set to 100.

    I suspect that the locked grid is not taking the border into account when setting the width as it does initially.

  3. #2
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    I am not sure this would be classified as a bug. When you create a locked column, you are actually creating a 2nd grid.

  4. #3
    Sencha Premium User
    Join Date
    Aug 2014
    Posts
    16

    Default

    Sure, it is not a bug. Anyway could you help me to find a solution how to fix grid width, to remove 1 pixel space between locked and unlocked parts?I have found how to override a theme to display a border of last locked column, and to hide separator by setting its width to 0 px. Unfortunately, grid width is not changed. It seems that the locked part is calculated independently from theme.

  5. #4

    Default

    I have some resize problem with grid. I have set grid auto fill as true ,still my columns are not getting resized. any clue?

  6. #5
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    It would be better to set flex to columns that you wish to grow.

  7. #6
    Sencha Premium User
    Join Date
    Aug 2014
    Posts
    16

    Default

    Can anybody help me to fix grid width so both grids look the same, have the same width? It is really critical for me.As I investigated, locked grid width is applied as inline style, I cannot change it using css, so it is calculated by container. Any ideas how to manage it?

  8. #7
    Sencha - Support Team scottmartin's Avatar
    Join Date
    Jul 2010
    Location
    Houston, Tx
    Posts
    9,410
    Answers
    716

    Default

    I am going to ask the simple question first. If you are setting the width of both, can you set 1 of the widths 1 pixel different?

    If you want to go after the method that calculates the width, have a look at:

    Ext.grid.locking.Lockable :: processColumns where the width is set by the existing column length.
    If you look at the normal grid with the element inspector, the inner-cell is 99, where the locked is set to 100.

    I suspect that the locked grid is not taking the border into account when setting the width as it does initially.

  9. #8
    Sencha Premium User
    Join Date
    Aug 2014
    Posts
    16

    Default

    I have overridden processColumns method in Ext.grid.locking.Lockable class. Works fine for me. Thank you very much. I am looking forward for this small fix in future release.

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •