1. #1
    Sencha User
    Join Date
    Sep 2008
    Posts
    118
    Vote Rating
    1
    RobWilson is on a distinguished road

      0  

    Question Table - Highlighting cells / rows

    Table - Highlighting cells / rows


    My 2nd post

    I already have a web-client that updates a table and then highlights any rows that have been updated.

    I'm trying to work out the best way to highlight
    • An entire row
    • Individual cells
    It appears that I can add a cell renderer to a column, but presumably I can override this on a cell by cell basis to override the columns renderer, then hopefully remove the cell-specific renderer so it uses the column renderer again?

    Is there a quick way to say 'highlight row X' or 'highlight the row with object A in my store'?

    Additionally, there appears to be a date renderer and ... (another one - I can't remember at the moment), can I 'chain' renderers so that I can highlight a normal cell, a date cell etc without extending each of the renderer classes? Any thoughts?

    Many thanks,
    Rob.

  2. #2
    Ext GWT Premium Member
    Join Date
    Jul 2008
    Posts
    29
    Vote Rating
    0
    leonate is on a distinguished road

      0  

    Default


    We also have to highlight some rows.
    Currently we do this by implementing GridCellRenderer.
    But still with this approach it is not clear how to set style properties for the whole table cell (TD tag). For example it is easy to change cell font with rendering html SPAN tag but it is not possible to change cell background?

    Any thoughts?

  3. #3
    Sencha User
    Join Date
    Sep 2008
    Posts
    118
    Vote Rating
    1
    RobWilson is on a distinguished road

      0  

    Default


    I really don't know at this stage - perhaps you can use the el() function I read about and manipulate the DOM directly?

    I would have hoped the 'cell renderer' would enable me to change 'how the cell renders', background included

  4. #4
    Ext User
    Join Date
    Sep 2008
    Location
    Kyiv, Ukraine
    Posts
    8
    Vote Rating
    0
    fes is on a distinguished road

      0  

    Lightbulb Background and everything that has css included already

    Background and everything that has css included already


    Cell renderer can change background color:
    Code:
     
    public String render(Model model, String property,
                ColumnData config, int rowIndex, int colIndex, ListStore<Model> store) {
    
      if (model.isValid()){
          	 config.style = "background-color:#FC9787;";
       }
    }

Thread Participants: 2