On Thu, 14 Oct 2010 16:13:13 -0400, John Labenski <jlaben...@gmail.com>
wrote:

> On Thu, Oct 14, 2010 at 11:00 AM, Jean-Yves F. Barbier <12u...@gmail.com>
> wrote:
> > Hi list,
> >
> > So I'm looking after advices (or code if it has already be done); my
> > needs are:
> > * Re-sort the tabular view by clicking on a column (and display which
> > one is the base of the sort & in which direction: ASC or DESC),
> > * Moving a column from its place to another (swapping org and dest
> > columns),
> 
> Not by dragging, however you can do it by using a dialog to allow the
> user to reorder the columns.

Ok, after re-thinking it is in fact no big deal as most users usually
organize each column once for all (and as I'll also retrieve dimensions,
placement & columns widths to put them in the DB for further setup recover,
it is a better idea.)

> > * Having a research box that auto-bind to this sorted column,
> ??

Found: I just have to keep a global flag that tells on which column the
list is sorted.

> > * Don't display/read all DB rows at once (as some tables are > 200
> > millions rows)
> 
> You want to use a wxGrid "virtual table" which means that you will
> have a function called for the values of each cell that is currently
> visible. Your function will return string that you want displayed.

I didn't knew wxGrid also had virtual table possibilities; I thought it was
only for wxListCtrl.
But what I fear with your comment "function called for the values of each
cell" is to get back to the main flaw of the python version I tested: far
too many DB queries; this is acceptable for a small number of users but
rapidly throttling for a large number of'em.

> > My questions are:
> > * What widget should I use as a base for that?
> > * How to manage "DB sliced readings" from this widget?
> 
> You would want to use the wxGrid control. If I remember correct this
> sample does something like what you need (which I have to add to the
> wxLua samples).
> 
> http://sourceforge.net/tracker/?func=detail&aid=2418101&group_id=140042&atid=745326

Thanks a lot John, I'm gonna test this at once.

regards,
JY
-- 
Visits always give pleasure: if not on arrival, then on the departure.
                -- Edouard Le Berquier, "Pensees des Autres"

------------------------------------------------------------------------------
Beautiful is writing same markup. Internet Explorer 9 supports
standards for HTML5, CSS3, SVG 1.1,  ECMAScript5, and DOM L2 & L3.
Spend less time writing and  rewriting code and more time creating great
experiences on the web. Be a part of the beta today.
http://p.sf.net/sfu/beautyoftheweb
_______________________________________________
wxlua-users mailing list
wxlua-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/wxlua-users

Reply via email to