Here's a stripped down version of what I use to do that:
I subclass qx.ui.table.cellrenderer.Abstract, and overwrite the
_getCellClass method.
There i add my class mySpecialCssClass which I put in an css file of my own.

You can't use appearances in table-cells. I assume this has to do with
performance.
But for most needs just a little css class will do thing. And it should
perform much faster than using:

_getContentHtml: function( cellInfo ){
  return "<span style=' ... my style hacks '>" +  qx.bom.String.escape(
cellInfo.value ) + "</span>"
}

But that too, would work!
But you need to subclass and make your own cellrendered either way.
You assign the cellrenderer like this;

    var tcm = myTable.getTableColumnModel();
    tcm.setDataCellRenderer( i, new myProject.myCellRenderer() );

Where i would be the column-index...
Here is a full-blown cellrenderer example that just adds a css class.
You can also remove the _getCellClassCSS method and put in the
_getContentHtml method above to just put style hacks into there directly.

////////////////////////////////////////////
qx.Class.define("myProject.myCellRenderer",{
extend: qx.ui.table.cellrenderer.Abstract,
construct:function(){
////////////////////////////////////////////

  this.base( arguments );

///////////
},members:{
///////////

  _getCellClass:function(cellInfo){
      var cellClass = this.base(arguments, cellInfo);
      if( !cellClass || cellInfo.value == null ) return "";
      return cellClass + " mySpecialCssClass";
   }

////
}});
////


Mvg,
Ralf ( @ gong.nl // 06-49147635 )


2009/7/3 <[email protected]>

>  Hi Everyone
>
> I need to change an appearance in table cell. However I cannot find
> anywhere the id of the table cell. Any help would be much appreciated.
>
> S pozdravem / Best regards,
>
> *Monika Falk*, Software Specialist
>
> *Tieto*
> email [email protected], direct +420597459905,  fax +420597459928
> Výstavní 292/13, 70200 Ostrava, Czech Republic,  
> *www.tieto.com*<http://www.tieto.com>
>
> Meet the new Tieto: *www.tieto.com/newtieto*<http://www.tieto.com/newtieto>
>
> Please note: The information contained in this message may be legally
> privileged and confidential and protected from disclosure. If the reader of
> this message is not the intended recipient, you are hereby notified that any
> unauthorised use, distribution or copying of this communication is strictly
> prohibited. If you have received this
>
>
>
>
> ------------------------------------------------------------------------------
>
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>
------------------------------------------------------------------------------
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to