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

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: (view raw, whole thread or download thread mbox)
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

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 -

Attachment: create_test_data.sql
Description: application/octet-stream (376 bytes)
Attachment: shot01.png
Description: image/png (29.8 KB) (inlined above)
Attachment: shot02.png
Description: image/png (30.1 KB) (inlined above)
Attachment: shot03.png
Description: image/png (30.6 KB) (inlined above)
Attachment: shot04.png
Description: image/png (30.1 KB) (inlined above)
Attachment: adding_enum_combobox_in_editgrid.diff
Description: application/octet-stream (1.8 KB)


pgadmin-hackers by date

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

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