ComboBox / SelectBox inside a table

View: New views
3 Messages — Rating Filter:   Alert me  

ComboBox / SelectBox inside a table

by Shankar_java :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi,

Iam using 0.8.2 and i need to add a ComboBox / SelectBox in one of the columns of a Table. Should the cellrenderer be dynamic or boolean? I have assumed it to be dynamic and proceeded as given below.

        var mergeRenderer = new qx.ui.table.cellrenderer.Dynamic();
        var tcm = table.getTableColumnModel();
        var comBox = new qx.ui.table.celleditor.ComboBox();
        tcm.setDataCellRenderer(0, mergeRenderer);
        tcm.setCellEditorFactory(0, comBox);

How could i populate the comBox with data. For e.g. "Cat", "Dog"?
Initially how to set it to some value using  tableModel.setData(rowData)?


-Shankar

Re: ComboBox / SelectBox inside a table

by Jonathan Weiß-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message


Hello Shankar,


you will need the cellrenderer "Replace" to display the value of the
ComboBox. To populate the ComboBox with data, have a look at setListData():
http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.table.celleditor.ComboBox~setListData
As a celleditor you can use the celleditor "ComboBox".

We have a nice example which you can use and play with:
http://demo.qooxdoo.org/devel/demobrowser/index.html#table~Table_Cell_Editor.html

Kind regards,
Jonathan

-----
Jonathan Weiß
Framework Engineer

http://mysterycity.de/blog Blog  -  http://www.linkedin.com/in/jonathanrass
LinkedIn  -  http://www.xing.com/profile/Jonathan_Weiss5 XING
--
View this message in context: http://n2.nabble.com/ComboBox-SelectBox-inside-a-table-tp3898932p3905238.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@...
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Re: ComboBox / SelectBox inside a table

by Shankar_java :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

hi,

Thanks for your hint on Replace. Will try and let u know.

-Shankar

Jonathan Weiß-2 wrote:
Hello Shankar,


you will need the cellrenderer "Replace" to display the value of the
ComboBox. To populate the ComboBox with data, have a look at setListData():
http://demo.qooxdoo.org/devel/apiviewer/#qx.ui.table.celleditor.ComboBox~setListData
As a celleditor you can use the celleditor "ComboBox".

We have a nice example which you can use and play with:
http://demo.qooxdoo.org/devel/demobrowser/index.html#table~Table_Cell_Editor.html

Kind regards,
Jonathan

-----
Jonathan Weiß
Framework Engineer

http://mysterycity.de/blog Blog  -  http://www.linkedin.com/in/jonathanrass
LinkedIn  -  http://www.xing.com/profile/Jonathan_Weiss5 XING
--
View this message in context: http://n2.nabble.com/ComboBox-SelectBox-inside-a-table-tp3898932p3905238.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel