A class-grid is a specialized grid-widget subclass that makes it easier to create grids that edit instances of classes. Rather than defining row and column classes and then instantiating those classes and adding them to a grid-widget, you instead specify a single expression that parametrically describes the slots to be edited, and then the class-grid will automatically create grid columns for those slots. It will also automatically create grid rows for a set of instances when you set its value property to be a list of instances.
A class-grid always has a single body section with other sections for column and row headers, and there are other limitations to the style of the grid. In exchange for those limitations, a class-grid is much easier to set up than a general grid-widget.
The edited-class property: set it to the name of the class whose instances the grid will display and/or edit.
The edited-slots property: set it to an association list of slot names with parameters that specify what sort of value is in each slot and how they should be edited in the grid. This will make a grid-column for each specified slot, and is the biggest step in creating a class-grid. See edited-slots for a full description of the format of this value. If a class-grid is on a form window in an IDE Project, then you can specify this large value interactively by using the IDE's Class Interface Editor dialog.
The value property: set it to be a list of instances of the edited-class. This will make a grid-row for each instance. Alternately you can call add-class-grid-row to add each row individually. Changing the list of instances in the value property in either of these ways will also cause the widget's on-change function to be run for user side effects.
To reject invalid slot values as soon as the user enters them, write one or more validate-edited-slot-value methods.
For advanced use, after a class-grid has been created you could find the automatically created column and row sections and their subsections and modify them as with any other grid-widget. To do so, you may want to know that the two column-sections are named :header and :body (in that order), and so are the two row-sections. The single subsection of each header section is also named :header. The name of each column in the body is the name of the slot that it edits.
See also class-grid-top-pane and class-grid-drawing-pane.