How to get the selection in a table before sorting the rows ?

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

How to get the selection in a table before sorting the rows ?

Loïc Bresson -- Novlog
Hi.

Is there a way to get the selected rows in a table just before the rows are
sorted (typically by clicking on a column header) ? What I want to achieve is
to keep the selection of the rows after sorting the table (because currently
the selection is cleared), so I'd like to reselect the rows after sorting the
table.
I could not find any event like "beforeSort" or "columnHeaderClick", and if
possible I'd like to avoid saving the selection each time it is changed.

Thanks.

--
Loïc Bresson


------------------------------------------------------------------------------
Join us December 9, 2009 for the Red Hat Virtual Experience,
a free event focused on virtualization and cloud computing.
Attend in-depth sessions from your desk. Your couch. Anywhere.
http://p.sf.net/sfu/redhat-sfdev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to get the selection in a table before sorting the rows ?

Fabian Jakobs
Administrator
Hi Loïc,

> Hi.
>
> Is there a way to get the selected rows in a table just before the rows are
> sorted (typically by clicking on a column header) ? What I want to achieve is
> to keep the selection of the rows after sorting the table (because currently
> the selection is cleared), so I'd like to reselect the rows after sorting the
> table.
> I could not find any event like "beforeSort" or "columnHeaderClick", and if
> possible I'd like to avoid saving the selection each time it is changed.
>  
The table scroller has such a "beforeSort" event. If you don't have meta
columns you can use something like this:

table.getPaneScroller(0).addListener("beforeSort", function() {
  // store selection
});


Best Fabian

--
Fabian Jakobs
JavaScript Framework Developer

1&1 Internet AG - Web Technologies
Ernst-Frey-Straße 9 · DE-76135 Karlsruhe
Telefon: +49 721 91374-6784
[hidden email]

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


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
Reply | Threaded
Open this post in threaded view
|

Re: How to get the selection in a table before sorting the rows ?

Loïc Bresson -- Novlog
Hi Fabian

> The table scroller has such a "beforeSort" event. If you don't have meta
> columns you can use something like this:
>
> table.getPaneScroller(0).addListener("beforeSort", function() {
>   // store selection
> });

There seems to be no "beforeSort" event for the table scroller.
qx.Class.supportsEvent(qx.ui.table.pane.Scroller, "beforeSort") returns false.
I'm working with 0.8.3, maybe this event is only in the trunk ?

Best
--
Loïc Bresson


------------------------------------------------------------------------------
Return on Information:
Google Enterprise Search pays you back
Get the facts.
http://p.sf.net/sfu/google-dev2dev
_______________________________________________
qooxdoo-devel mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel