Hi Monika,

you could try to write a wrapper that delegates the creation to the cell 
editor if the row is not the last row.

Here an example for the wrapper:
qx.Class.define("testtable.CellEditorFactoryWrapper",
{
  extend : qx.core.Object,
  implement : qx.ui.table.ICellEditorFactory,

  /**
   * @param cellEditorFactory {qx.ui.table.ICellEditorFactory}
   */
  construct : function(cellEditorFactory) {
    this.base(arguments);
   
    this.__cellEditorFactory = cellEditorFactory;
  },

  members :
  {
    __cellEditorFactory : null,
   
    createCellEditor : function(cellInfo)
    {
      if (cellInfo.row != cellInfo.table.getTableModel().getRowCount() - 
1) {
        return this.__cellEditorFactory.createCellEditor(cellInfo);
      } else {
        return null;
      }
    },

    getCellEditorValue : function(cellEditor) {
      return this.__cellEditorFactory.getCellEditorValue(cellEditor);   
    }
  },
 
  destruct : function() {
    this._disposeFields("__cellEditorFactory");
  }
});

You can set your wrapper to the column model like this:
var tcm = table.getTableColumnModel();
tcm.setCellEditorFactory(1, new testtable.CellEditorFactoryWrapper(new 
qx.ui.table.celleditor.TextField()));
tcm.setCellEditorFactory(2, new testtable.CellEditorFactoryWrapper(new 
qx.ui.table.celleditor.CheckBox()));
tcm.setCellEditorFactory(3, new testtable.CellEditorFactoryWrapper(new 
qx.ui.table.celleditor.ComboBox()));

With this wrapper, it should be possible do disable the last row, but 
the last row is rendered like the other rows. To change this, you can 
write a wrapper for the ICellRenderer and an own renderer. The logic is 
like my wrapper example. The different is that you delegate to your own 
renderer if the current row is the last one.

I hope I could solve you issue, if you have any further questions, 
please ask.

Cheers,
Chris

[email protected] schrieb:
>  Hi Everyone
>
> I am using editable columns in table. Can I somehow disable this for the last 
> row in a editable column? I mean that last row is a summary and I don't wont 
> user to have a possibility to edit that,
>
> S pozdravem / Best regards,
>
> Monika 
>
>
>
> ------------------------------------------------------------------------------
> Come build with us! The BlackBerry® 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/devconf
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>   


-- 
Christian Schmidt
Software Entwickler

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
[email protected]

Amtsgericht Montabaur / HRB 6484
Vorstände: Henning Ahlert, Ralph Dommermuth, Matthias Ehrlich, Thomas 
Gottschlich, Robert Hoffmann, Markus Huhn, Hans-Henning Kettler, Dr. Oliver 
Mauss, Jan Oetjen
Aufsichtsratsvorsitzender: Michael Scheeren


------------------------------------------------------------------------------
Come build with us! The BlackBerry® 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/devconf
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to