Row count issue with datagrid tutorial

I like to look at a DataGrid as a tool designed to show a list of dictionaries.

Row objects behave like dictionaries, so you can show them, but this is the only link between database and DataGrid. It’s a coincidence more than a design intention.

You can do nothing, and the DataGrid will show unformatted text.
You can use a simple template, and the DataGrid will use the template to format or edit your data.
You can make your template as complex as you like, and the DataGrid will still work.

Most of my DataGrids are not really DataGrids, they are DataGridJsons, and show the simplest formatting.

Other DataGrids have complex templates with canvases to show a graphic representation of the data, with sub-DataGrids to show tree-like data, etc.

The bad thing is that the DataGrid doesn’t offer great functionalities out of the box.
The good thing is that you can make it as complex as you like.

You can even do CRUD with it! :slight_smile:

2 Likes