Hello,

I'm receiving data from my backend and for a particular column (#2) I'm
receiving a number 1/2/3 which indicate the state of an operation.

I want to display string instead of 1, 2 and 3 and I want to color these
strings too.

I don't know how to do it, I created two renderes but the last overrides the
previous.

a portion of my code below:

      // state  column
      var propertyStateColRenderer = new  qx.ui.table.cellrenderer.Replace; 
      propertyStateColRenderer.setReplaceMap({ 1 : "started", 2 : "Stopped",
4 : "Invalid" }); 
      propertyStateColRenderer.addReversedReplaceMap();
      tcm.setDataCellRenderer(2, propertyStateColRenderer);

      //state column cell colors
      var conditionStateRenderer = new
qx.ui.table.cellrenderer.Conditional("center",null,null,"bold");
      conditionStateRenderer.addNumericCondition("==",1, null, "#00FF00",
null, null,null); 
      conditionStateRenderer.addNumericCondition("==",2, null, "#FF0000",
null, null,null); 
      conditionStateRenderer.addNumericCondition(">",2, null, "#FFFFFF",
null, null,null);
      tcm.setDataCellRenderer(2,conditionStateRenderer);    

Regards

--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Two-cell-renderers-tp6250935p6250935.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Xperia(TM) PLAY
It's a major breakthrough. An authentic gaming
smartphone on the nation's most reliable network.
And it wants your games.
http://p.sf.net/sfu/verizon-sfdev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to