Page 1 of 1

Data-aware Grid

Posted: Wed Aug 19, 2020 10:27 am
by psyclops
This is an editable grid that I've been developing in pure PureBasic.

It is data-aware in that it sources its data from a database via a data provider. Currently there is only a SQLite data provider but other data providers can be developed for ODBC, MySQL etc.

It includes features such as:

- Master-Detail grids
- Fixed columns
- Popup editors such as for long text, date/time, and for populating foreign keys from other tables.
- A very basic hand written inline text editor, this was necessary as trying to overlap gadgets, yikes!
It can be used as a base for developing other inline editors.
- Column sorting (currently only one column at a time)
- Basic filtering
- Handles larger datasets by requesting records from the data provider as necessary, it does not request all records at once.

Some screenshots:

1. This shows two grids in master-detail.

Image


2. This shows the calendar popup editor for a date field.

Image


3. This shows the large text popup editor.

Image


4. This shows column sorting with an indicator in the top right of the column header.

Image


5. This shows the list of values popup editor for populating foreign keys. Two fields from the foreign key are used, firstly the primary key which is applied to the database and a more descriptive field such as name or description is shown to the user.

Image


6. This shows another example with filtering applied. It also shows fixed columns (enabled, first name, last name) and a checkbox field.

Image


7. This shows the insert record for creating new records.

Image

Re: Data-aware Grid

Posted: Wed Aug 19, 2020 1:49 pm
by NicTheQuick
You didn't add any link to the code or to test it out. Also does it work on Linux too?

Re: Data-aware Grid

Posted: Wed Aug 19, 2020 1:56 pm
by psyclops
I haven't posted the code or a test sample as it is still work in progress. It should work on Linux with a bit testing and tweaking as I'm not using any platform specific code.

Re: Data-aware Grid

Posted: Wed Aug 19, 2020 2:09 pm
by captain_skank
Looks good.

A few q's if i may :

1. is it DPI aware ?
2. is it a module ?
3. does it have variable row heights ?

Cheers

Re: Data-aware Grid

Posted: Wed Aug 19, 2020 2:21 pm
by psyclops
Thanks for the good questions!

1. I haven't tested DPI aware yet.

2. Yes, it is modular, it is made up of a several modules. The grid can be extended using a "plugin" which is a module that listens to grid events.

3. Unfortunately no variable row heights at the moment. I did consider this but it was adding complexity to the grid functionality that I couldn't yet figure out. This should be a future improvement.

Cheers!

Re: Data-aware Grid

Posted: Wed Aug 19, 2020 9:32 pm
by Mohsen
It seems interesting and useful, :) I am waiting for its release :wink:

Re: Data-aware Grid

Posted: Sun Sep 05, 2021 12:00 am
by dagcrack
No release?

Re: Data-aware Grid

Posted: Sun Sep 05, 2021 1:33 am
by BarryG
dagcrack wrote: Sun Sep 05, 2021 12:00 amNo release?
Doesn't look like he's around here anymore:

Image