1. #1
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    48
    Answers
    2
    Vote Rating
    1
    hiroprotagonist is on a distinguished road

      0  

    Default Answered: Grid Cell Editing: Editor height

    Answered: Grid Cell Editing: Editor height


    Guys,

    I have a treepanel where I change the visualization with CSS. The cells are larger in height and width.
    Looks like this:
    Code:
    .project-grid-column-default div {
    margin: 1px 1px 1px 1px;
    font-size: 14px;
    padding: 2px 20px 8px;
    }
    
    This works nicely for the cells themselves but when using an editor for changing the cell's content, the editor's width is adapted to cell width, but not the height.

    Any hints how this can be accomplished?

    Many thanks

    Hiro.

  2. guys,

    the problem with the height of the editor is, that the CellEditing plugin creates a new instance of Ext.grid.CellEditor where from the outside it is not possible to add config information like the autosize information. Solution was to derive from the CellEditing plugin and override the getEditor method where I changed the code like below.

    Hiro.

    Code:
    editor = new Ext.grid.CellEditor({                     
      editorId: editorId,
      field: editor,
      ownerCt: me.grid,
      /* start changing original code */
      // make sure the height of the cell will be read from the cell's height.
      autoSize: {
        width: 'field', // Width from the field 
        height: 'boundEl' // Height from the boundEl
      }                     
      /* end changing original code */                 
    });

  3. #2
    Sencha User
    Join Date
    Aug 2012
    Location
    Dublin
    Posts
    72
    Vote Rating
    11
    iplanit will become famous soon enough

      0  

    Default


    Did you try with CSS !important ?

  4. #3
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    48
    Answers
    2
    Vote Rating
    1
    hiroprotagonist is on a distinguished road

      0  

    Default


    The point with the CSS above is that is works perfectly for the cells, but it doesnt for the editor that is placed within the cells when trying to change the value of the cell. The editor does not fit the height that the cell gets by the padding.

    So !important does not help here.
    Thanks for the hint anyway.

  5. #4
    Sencha Premium Member
    Join Date
    Jan 2012
    Posts
    48
    Answers
    2
    Vote Rating
    1
    hiroprotagonist is on a distinguished road

      0  

    Default


    guys,

    the problem with the height of the editor is, that the CellEditing plugin creates a new instance of Ext.grid.CellEditor where from the outside it is not possible to add config information like the autosize information. Solution was to derive from the CellEditing plugin and override the getEditor method where I changed the code like below.

    Hiro.

    Code:
    editor = new Ext.grid.CellEditor({                     
      editorId: editorId,
      field: editor,
      ownerCt: me.grid,
      /* start changing original code */
      // make sure the height of the cell will be read from the cell's height.
      autoSize: {
        width: 'field', // Width from the field 
        height: 'boundEl' // Height from the boundEl
      }                     
      /* end changing original code */                 
    });

Thread Participants: 1

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."