PoC: Little improvements to EditGrid - Enum ComboBox - Mailing list pgadmin-hackers

From Dickson S. Guedes
Subject PoC: Little improvements to EditGrid - Enum ComboBox
Date
Msg-id CAHHcreqtXBrU2n7msPs5xZFOT0B3j_8F+0VJ6-CwsAXaqWTU8Q@mail.gmail.com
Whole thread Raw
Responses Re: PoC: Little improvements to EditGrid - Enum ComboBox
Re: PoC: Little improvements to EditGrid - Enum ComboBox
List 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@guedesoft.net - skype: guediz
http://guedesoft.net - http://www.postgresql.org.br

Attachment

pgadmin-hackers by date:

Previous
From: Timon
Date:
Subject: Re: pgAdmin III commit: Lots of work on domains, and check constraints
Next
From: Dave Page
Date:
Subject: Re: PoC: Little improvements to EditGrid - Enum ComboBox