Daniel Haferkorn wrote:
> Nick Glencross wrote:
>> You can hide the PID very easily. Assuming you are using the
>> SimpleTableModel to store your data, then you can store values in
>> columns which are beyond the column count set up in the Table itself.
>
> Hello Nick,
>
> the only column count in the Table widget that I know of is the
> MetaColumnCount - do you mean that?
Basically when you set up the SimpleTableModel and call setColumns you
are defining the number of columns which will be displayed. When you do
your SetData to supply it with data, you can store additional columns,
such as a unique ID, or the colour of the row, in extra columns.
When the row is selected or changed, the id can then be retrieved. e.g.
in a dataChanged event:
var change_info = e.getData ();
var first = change_info['firstRow'];
var last = change_info['lastRow'];
this.info("Data changed for rows " +
first + " ..." + last);
var ids = [];
var id_column = 9; // For example
for (var i = first ; i <= last ; i++)
{
ids.push (table_model.getValue (id_column, i));
}
Hope that helps!
Nick
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel