Hello Nick,
thank you for that example code. Seems to be working very well. :)
Regards,
Daniel Haferkorn
Nick Glencross wrote:
> 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