Hello William,
I don't think that it is a problem. You might got confused 'index' and 'id' in
this context.
I am using filtered table models all the time with (non-numeric) 'id's
If you have created your table model something like this:
<code>
var tableModel = new qx.ui.table.model.Filtered();
tableModel.setColumns([ "First", "Second" ],["id0", "id1"]);
</code>
The column 'id's "id0" and "id1" can be used to 'address' the two visible
columns (index 0 and index 1!). While all others (e.g. "id_id") are not
visible, but still fully accessible.
So this line:
<code>
tableModel.addNumericFilter("<", 10, "id_id");
</code>
should filter all rows where "id_id" data-array member is less then 10.
The 'magic' conversion from 'id' to 'index' is done when the filtered table
model asks for the cell value via <code>getValueById</code>.
Note however that you have to add the data as Array of Maps! So you have to do
something like :
<code>
var rowData = [ // example!
{id0:1024, id1:"foo", id_id:0},
{id0:4096, id1:"bar", id_id:1},
{id0:1024, id1:"...", id_id:2}
];
tableModel.setDataAsMapArray(rowData, true);
</code>
/Peter
Am 9/15/2014 um 12:29 PM schrieb woprandi:
> Hi,
>
> I have table with filtered model. Rows model contains "visible" fields
> (columns) and "invisible" field (row id in DB, ...) but still present in the
> row model. I'd like to filter rows with one of this field but I noticed it
> is only possible to filter by a column id. I don't know if this limitation
> is suitable or not.
>
> [...]
--
** Unsere Veranstaltungen:
Post-Expo in Stockholm, Halle A - Stand A10.05, 23.-25.09.2014
3. Innovationsforum Telematik in Bocholt, 16.10.2014
BWVL-Tagung in Köln, 12.-13.11.2014
------------------------------------------------------------------------------
Want excitement?
Manually upgrade your production database.
When you want reliability, choose Perforce
Perforce version control. Predictably reliable.
http://pubads.g.doubleclick.net/gampad/clk?id=157508191&iu=/4140/ostg.clktrk
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel