50+ Tables/Data Grids - Best Practices Question

50+ tables
I like to keep the number of tables to a minimum and the number of columns on each table to a minimum. I put the bulk of the data in simple object columns.

For example I’m working on an app to manage trucks containing crates containing items of different types. There is only one Trucks table with a few columns that allows me to find the truck I need. The table has a few simple object columns with all the data I need about a truck. The data in each truck is versioned, so I can see who and when loaded what in what crate of what truck, and all the steps of each item through each department until the item is loaded in a crate and the crate in the truck. Large trucks can have hundreds of versions with hundreds of items and their simple objects can exceed 1MB of size.

The app has about 20 datagrids on both user forms and forms intended to be rendered to PDF.

50+ datagrids
In this app I created 20 distinct datagrids, each with its own template form, because they are highly customized. Some have nested repeating panels to show the items inside the crates inside the trucks, and some have canvasses to show the graphic representation of the crate content. So there was no way to make it simpler.

But in other simpler apps, where the datagrids are all similar, I use something like this DataGridJson. The advantage is that it creates the row template under the hood and manages simple click events for me. The disadvantage is that the resulting datagrid is pretty basic.

I use it as is in prototypes, then, when it’s time to go to production, I either customize it for the specific app or switch to the normal datagrid and its tedious setup. Perhaps you could have a look at it and improve it to match your requirements, assuming that your datagrids will be similar enough.

Another solution could be the Tabulator instead of the datagrid. I have never used it because I have either very simple cases where the datagrid is just perfect or very complex cases where the Tabulator can’t be customized enough, but it could be a good alternative that doesn’t require template forms.

3 Likes