Threaded View

  1. #1
    Ext User
    Join Date
    Dec 2008
    Posts
    34
    Vote Rating
    0
    Noggy is on a distinguished road

      0  

    Exclamation Possible Bug on EditorGrid prevents from changing cell background color

    Possible Bug on EditorGrid prevents from changing cell background color


    Hi all !
    I'm still stuck at trying to change a grid cell background color. After my last attemp,
    i'm beginning to be convinced it's a bug on GXT.

    Here's the sample code
    Code:
       List<ColumnConfig> configs = new ArrayList<ColumnConfig>();
      ColumnConfig scheduleName  = new ColumnConfig();;
      
      GridCellRenderer<PortionGridDrawModel> change = new GridCellRenderer<PortionGridDrawModel>() {  
      
      
      public String render(PortionGridDrawModel model,String property, ColumnData config, int rowIndex,
      int colIndex, ListStore<PortionGridDrawModel> store) {
      
            String style = "black";
            String temp = model.get(property);
      
      
      return "<span style='background-color:'"+style+"'>"+temp+"</span>";;  
      
      }  
      };  
      
      
      scheduleName = new ColumnConfig();
            scheduleName.setId("portionName");
            scheduleName.setWidth(150);
            scheduleName.setMenuDisabled(true);
            scheduleName.setResizable(false);
            scheduleName.setRenderer(change);
            configs.add(scheduleName);
      
      ColumnModel cm = new ColumnModel(configs);
      
      
      EditorGrid<PortionGridDrawModel> grid = new EditorGrid<PortionGridDrawModel>(scheduleListStore, cm); 
            grid.setBorders(false);
            grid.setClicksToEdit(ClicksToEdit.TWO);
            grid.disableTextSelection(true);
    GWT version : 1.5.3
    GXT version : 1.2

    TIA,
    Carlos
    Last edited by Noggy; 13 Feb 2009 at 11:43 AM. Reason: forgot some stuff