Discussion:
[qooxdoo-devel] setDataCellRenderer not working?
qdev
2016-03-31 09:06:56 UTC
Permalink
I struggle with this code where setDataCellRenderer is used.
I would like to render the third column of table as boolean. My qooxdoo
code works fine but shows an integer instead of boolean check-boxes.
So I decided to set a data renderer.

I am using qooxdoo version: 5.0.1 sdk

var doc = this.getRoot();

var table = new qx.ui.table.Table(tableModel).set({ decorator: null });

var tableModel = new qx.ui.table.model.Simple();

tableModel.setColumns([ this.tr( "File" ), this.tr("Doctype") , this.tr("Status") ]);

// make second column editable

tableModel.setColumnEditable(1, true);

// Display a checkbox in column 3

var tcm = table.getTableColumnModel();

tcm.setDataCellRenderer(3, new qx.ui.table.cellrenderer.Boolean());




Thanks for any help.
Raymond
Norbert Schroeder
2016-03-31 09:35:59 UTC
Permalink
Try "2" for the column index:

tcm.setDataCellRenderer(2, new qx.ui.table.cellrenderer.Boolean());

Regards,

Norbert
Post by qdev
I struggle with this code where setDataCellRenderer is used.
I would like to render the third column of table as boolean. My qooxdoo
code works fine but shows an integer instead of boolean check-boxes.
So I decided to set a data renderer.
I am using qooxdoo version: 5.0.1 sdk
var doc = this.getRoot();
var table = new qx.ui.table.Table(tableModel).set({ decorator: null });
var tableModel = new qx.ui.table.model.Simple();
tableModel.setColumns([ this.tr( "File" ), this.tr("Doctype") , this.tr("Status") ]);
// make second column editable
tableModel.setColumnEditable(1, true);
// Display a checkbox in column 3
var tcm = table.getTableColumnModel();
tcm.setDataCellRenderer(3, new qx.ui.table.cellrenderer.Boolean());
Thanks for any help.
Raymond
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Raymond Rösch
2016-04-04 11:39:56 UTC
Permalink
Dear Norbert,

thanks, it worked for me. solved.

I found an additional error too: In my code the tablemodel is referenced
once before it was created !

Regards
Raymond
Post by Norbert Schroeder
tcm.setDataCellRenderer(2, new qx.ui.table.cellrenderer.Boolean());
Regards,
Norbert
Post by qdev
I struggle with this code where setDataCellRenderer is used.
I would like to render the third column of table as boolean. My qooxdoo
code works fine but shows an integer instead of boolean check-boxes.
So I decided to set a data renderer.
I am using qooxdoo version: 5.0.1 sdk
var doc = this.getRoot();
var table = new qx.ui.table.Table(tableModel).set({ decorator: null });
var tableModel = new qx.ui.table.model.Simple();
tableModel.setColumns([ this.tr( "File" ), this.tr("Doctype") , this.tr("Status") ]);
// make second column editable
tableModel.setColumnEditable(1, true);
// Display a checkbox in column 3
var tcm = table.getTableColumnModel();
tcm.setDataCellRenderer(3, new qx.ui.table.cellrenderer.Boolean());
Thanks for any help.
Raymond
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
------------------------------------------------------------------------------
Transform Data into Opportunity.
Accelerate data analysis in your applications with
Intel Data Analytics Acceleration Library.
Click to learn more.
http://pubads.g.doubleclick.net/gampad/clk?id=278785471&iu=/4140
_______________________________________________
qooxdoo-devel mailing list
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Loading...