Hi,

You can with this code :

      var tableModel = new qx.ui.table.model.Simple();
      tableModel.setColumns([ "test", "selected"],["idtest","idselect"]);      
       
      var tableSelect = new qx.ui.table.Table(tableModel);
      var columnModel = tableSelect.getTableColumnModel();
     
columnModel.setDataCellRenderer(tableModel.getColumnIndexById("idselect"),
new qx.ui.table.cellrenderer.Boolean());
      tableModel.setDataAsMapArray([
            {idtest:"first", idselect:false},
            {idtest:"second", idselect:false},
            {idtest:"third", idselect:false}
        ]);
  
    
     var selectionModel =
tableSelect.getSelectionManager().getSelectionModel();
    
selectionModel.setSelectionMode(qx.ui.table.selection.Model.MULTIPLE_INTERVAL_SELECTION);
     selectionModel.addListener("changeSelection", function(e) {
        var tablemodel = this.getTableModel();
        var data = tablemodel.getDataAsMapArray();
        var colSelect = tableModel.getColumnIndexById("idselect");
        for (var i=0,l=data.length;i<l;i++) {
            var rowIsSelected = selectionModel.isSelectedIndex(i);
            tablemodel.setValue(colSelect, i, rowIsSelected);        
        }
        
     }, tableSelect);

and you added in the color theme 

qx.Theme.define("tableaction.theme.Color",
{
  extend : qx.theme.modern.Color,

  colors :
  {
    "table-row-background-focused-selected" : "transparent",
    "table-row-background-selected" : "transparent"
  }
});

Best regards
Sébastien




skar karthikeyan wrote:
> 
> Hi,
> 
> I'm having a multi-select table. Is there any way to use a checkbox
> which is checked when a row is selected, instead of the current
> highlight only option?
> 
> cheers,
> skar.
> 
> -- 
> --
> The life so short, the craft so long to learn. 
> 
> 
> ------------------------------------------------------------------------------
> Let Crystal Reports handle the reporting - Free Crystal Reports 2008
> 30-Day 
> trial. Simplify your report design, integration and deployment - and focus
> on 
> what you do best, core application coding. Discover what's new with 
> Crystal Reports now.  http://p.sf.net/sfu/bobj-july
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
> 
> 

-- 
View this message in context: 
http://www.nabble.com/Table-with-checkbox-based-select-tp25134760p25150040.html
Sent from the qooxdoo-devel mailing list archive at Nabble.com.


------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day 
trial. Simplify your report design, integration and deployment - and focus on 
what you do best, core application coding. Discover what's new with 
Crystal Reports now.  http://p.sf.net/sfu/bobj-july
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to