PoC: Little improvements to EditGrid - Enum ComboBox

From: "Dickson S(dot) Guedes" <listas(at)guedesoft(dot)net>
To: pgadmin-hackers <pgadmin-hackers(at)postgresql(dot)org>
Subject: PoC: Little improvements to EditGrid - Enum ComboBox
Date: 2012-06-06 06:33:07
Message-ID: CAHHcreqtXBrU2n7msPs5xZFOT0B3j_8F+0VJ6-CwsAXaqWTU8Q@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgadmin-hackers

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;
2) show a datetime picker in columns of type date/time/timestamp;
3) show a combo box in columns that has referential to another table;

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.

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?

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.

- 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.

- Caching the data for performance.

Well, this is just a start point and your opinions is very important.

What do you think guys?

Thanks and best regards.

--
Dickson S. Guedes
mail/xmpp: guedes(at)guedesoft(dot)net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

Attachment Content-Type Size
create_test_data.sql application/octet-stream 376 bytes
image/png 29.8 KB
image/png 30.1 KB
image/png 30.6 KB
image/png 30.1 KB
adding_enum_combobox_in_editgrid.diff application/octet-stream 1.8 KB

Responses

Browse pgadmin-hackers by date

  From Date Subject
Next Message Dave Page 2012-06-06 08:33:29 Re: PoC: Little improvements to EditGrid - Enum ComboBox
Previous Message Timon 2012-06-06 04:50:45 Re: pgAdmin III commit: Lots of work on domains, and check constraints