Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
Clear All
new posts

    Color editor in editor list grid

    Hi

    is there an easy way, to show the chosen color (not just the hex code) also in the non edited rows?

    Maybe somehow enabling the color picker rectangle for all cells, or setting the background color for each row of the column color.

    Greetings Thomas
    Attached Files

    #2
    You could use getCellCSSText() to add the color as a background color.

    Comment


      #3
      Color editor in editor list grid

      final ListGrid yourGrid = new ListGrid(){
      @Override
      protected String getCellCSSText(ListGridRecord record, int rowNum, int colNum)
      {
      if (getFieldName(colNum).equals("yourgridfieldname")) {
      return "font-weight:bold; "+"background-color:"+record.getAttribute("yourgridfieldname")+";";
      }
      else
      {
      return super.getCellCSSText(record, rowNum, colNum);
      }
      }
      };

      Comment

      Working...
      X