Skip site navigation (1) Skip section navigation (2)

Re: PoC: Little improvements to EditGrid - Enum ComboBox

From: Guillaume Lelarge <guillaume(at)lelarge(dot)info>
To: Dave Page <dpage(at)pgadmin(dot)org>
Cc: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>, pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: Re: PoC: Little improvements to EditGrid - Enum ComboBox
Date: 2012-06-06 08:49:39
Message-ID: 1338972579.1792.9.camel@localhost.localdomain (view raw, whole thread or download thread mbox)
Lists: pgadmin-hackers
On Wed, 2012-06-06 at 09:33 +0100, Dave Page wrote:
> Hi
> On Wed, Jun 6, 2012 at 7:33 AM, Dickson S. Guedes <listas(at)guedesoft(dot)net> wrote:
> > Hello all,
> >
> > I'm starting some proof-of-concept working on frmEditGrid trying make
> > some "improvements" like:
> >
> > 1) show a combo box in columns of type enum;
> Nice.
> > 2) show a datetime picker in columns of type date/time/timestamp;
> Hmm, nice idea in principle, but I'm not sure if there's a suitable
> control that will allow the flexibility required (fractional seconds,
> timezones etc). Obviously that's not needed in all cases, but we
> should be consistent, otherwise we'd get people asking why they can
> use a picker for timestamp but not timestamptz for example.
> > 3) show a combo box in columns that has referential to another table;
> Also nice, but I think this one needs some careful handling. Perhaps
> limit the combo items to the first 500 or something, and still allow
> the user to manually type a value? We don't want to try to load 10
> million values into the combo!
> > For the first item I have a very WIP patch (attached based on commit
> > 896dce8f744816385aa89013d7808960f15a5109) and a working example
> > (attached screenshots and sql) .. I'd like to see your opinions about
> > them, if it is a good idea, and if the initial implementation is
> > following the expectations of such feature. I'd like to know if anyone
> > is/was working in a feature like this, I wouldn't like to reinvent the
> > wheel.
> Looks like a great start to me.
> > For the second one I'm researching some interaction between
> > wxDatePicker, wxTimePicker and wxCalendarCtrl to create a new type of
> > CellEditor, so we could use some sqlGridDateTimeEditor that
> > encapsulates the logic. Is that a good approach? What is your opinions
> > about that?
> Right - see above. Maybe the answer is to develop a popup control that
> can handle date/time/timezone, and yet still allow the user to edit
> manually for things like fractional seconds.
> > Finally, for the last one, I see some challenges like:
> >
> > - Which field should be displayed in the combo?
> >   Generally the value of a FK doesn't has enough information about
> > what it means, them you need another field (e.g  a description or
> > person_name field) to make sense.
> Well, you could use a grid instead of a combo box to allow the user to
> choose, and display the FK value in the first column, and the PK value
> from the referenced table in the second and subsequent rows. I think
> anything more than that is probably too domain specific.
> > - How to play with composite referential keys? Should they be
> > supported, and if so how should be the behavior?
> >  It seems pretty dark to me how to bring values from two fields from
> > a FK in distinct combo boxes.
> Yeah, I don't really like the idea of trying to support that case. I
> can't see any sensible way to make it work nicely.
> > - Caching the data for performance.
> Yes! :-)
> > Well, this is just a start point and your opinions is very important.
> >
> > What do you think guys?
> I think it'll be a nice addition to the tool - thanks for working on it.


> One additional suggestion you may want to include: bytea handling. For
> input, allow the user to select a local file as the contents of a
> bytea field. For output, it would be great if we could detect some
> common filetypes and offer viewers for them - e.g. detect that a bytea
> contains an image and allow the user to view it.

And handling of big texts, and NULL values. But even without that, it
would be great to see the enum, and simple FK handling.


In response to

pgadmin-hackers by date

Next:From: Dave PageDate: 2012-06-06 08:56:19
Subject: pgAdmin III commit: Update VC++ project files to 2010
Previous:From: Dave PageDate: 2012-06-06 08:33:29
Subject: Re: PoC: Little improvements to EditGrid - Enum ComboBox

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group