1. #1
    Sencha User
    Join Date
    Jan 2012
    Location
    Russia
    Posts
    10
    Vote Rating
    0
    Vadim Kolesnikov is on a distinguished road

      0  

    Default Answered: Grid, method setColumnLines(true) - offset by 1px the header lines. Bug? How to fix?

    Answered: Grid, method setColumnLines(true) - offset by 1px the header lines. Bug? How to fix?


    Hi All,

    offset.jpg
    http://www.sencha.com/examples/#basicgrid
    ColumnHeader:
    Code:
      
    public void updateTotalWidth(int offset, int width) {
           if (offset != -1) table.getElement().getParentElement().getStyle().setPropertyPx("width", ++offset);
           table.getElement().getStyle().setProperty("width", (++width) + "px");
    }
    Temporarily solved the problem - override method and delete '++':
    table.getElement().getStyle().setProperty("width", (width) + "px");

    There is another way? Please help me.

    - GXT version: 2.2.5
    - Host mode / web mode / both: All
    - Browser and version: All (without Opera)
    - Operating System: Windows 7
    Last edited by Vadim Kolesnikov; 6 Apr 2012 at 4:55 AM. Reason: new image + link

  2. Looks like it is a bug.

  3. #2
    Sencha User
    Join Date
    Nov 2009
    Posts
    51
    Answers
    1
    Vote Rating
    0
    smiletolead is on a distinguished road

      0  

    Default


    Looks like it is a bug.

  4. #3
    Software Architect
    Join Date
    Sep 2007
    Posts
    13,966
    Answers
    60
    Vote Rating
    130
    sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light sven is a glorious beacon of light

      0  

    Default


    Yes this is a known issue and is already on the list.

  5. #4
    Sencha User
    Join Date
    Jan 2012
    Location
    Russia
    Posts
    10
    Vote Rating
    0
    Vadim Kolesnikov is on a distinguished road

      0  

    Default


    Thanks. What version of wait for fix?

  6. #5
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
    treblereel is on a distinguished road

      0  

    Default


    looks like my problem the same, is it ? grid.png

  7. #6
    Sencha User
    Join Date
    Jan 2012
    Location
    Russia
    Posts
    10
    Vote Rating
    0
    Vadim Kolesnikov is on a distinguished road

      0  

    Default


    looks like this it.
    PHP Code:
    com.extjs.gxt.ui.client.widget.grid.ColumnHeader:
    updateTotalWidth(int offsetint width) {
       if (
    offset != -1) {
          
    table.getElement().getParentElement().getStyle().setPropertyPx("width",++offset);
       }
       
    width += headsOffset// in some tables headsOffset == cm.getColumnCount()
       
    table.getElement().getStyle().setProperty("width", (width) + "px");

    I'm setting a new value for 'headsOffset' in each table
    You will can try to experiment

  8. #7
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
    treblereel is on a distinguished road

      0  

    Default


    Can you explain in waht part of code you have put it ? maybe little example ?

  9. #8
    Sencha User
    Join Date
    Jan 2012
    Location
    Russia
    Posts
    10
    Vote Rating
    0
    Vadim Kolesnikov is on a distinguished road

      0  

    Lightbulb


    Oh, of course

    I'm created class (MyGridView) that extends GridView and was need override "newColumnHeader()" method:
    PHP Code:
    @Override
    protected ColumnHeader newColumnHeader() {
        
    header = new ColumnHeader(gridcm) {
           
    // copy & paste from the parent class (GridView).
           
    @Override
           
    public void updateTotalWidth(int offsetint width) {
               if (
    offset != -1) {
                  
    table.getElement().getParentElement().getStyle().setPropertyPx("width",++offset);
               }
               
    width += headsOffset;
               
    table.getElement().getStyle().setProperty("width", (width) + "px");
            }
        };
     } 
    And was set new view for my Grid example:
    PHP Code:
    Grid<Examplegrid;
    ...
    grid.setView(new MyGridView()); 
    Attached Files

  10. #9
    Sencha User treblereel's Avatar
    Join Date
    Mar 2010
    Location
    Moscow,Russia
    Posts
    67
    Vote Rating
    1
    treblereel is on a distinguished road

      0  

    Default


    Thanks, but i use EditableTreeGrid, so it doesnt helps me
    Anyway, thanks

  11. #10
    Sencha User
    Join Date
    Jan 2012
    Location
    Russia
    Posts
    10
    Vote Rating
    0
    Vadim Kolesnikov is on a distinguished road

      0  

    Default


    Anyway, try. This it is the same Grid.
    No problem. You are welcome. =)

film izle

hd film izle

film sitesi

takipci kazanma sitesi

takipci kazanma sitesi

güzel olan herşey

takipci alma sitesi

komik eğlenceli videolar