Defines the RevColumnsManager class, which manages all aspects of grid columns in the revgrid component. It is the central class for managing the structure, visibility, sizing, and settings of columns in the grid, ensuring that the grid view and data schema remain synchronized.
There is one Field Column for each field in the schema server. These are listed in RevColumnsManager.fieldColumns with the same order as the respective fields in the schema server.
Currently, the field columns are regenerated after any change to the list of fields in the schema server. These changes are not broadcast to other components in the grid; so currently, it is not recommended to change the schema after a grid has been activated. In the future, RevColumnsManager needs to better support RevSchemaServer.NotificationsClient to allow lists of fields in schemas to be changed after a grid has been activated.
Active columns are columns that can be viewed in the grid. They are always a subset of Field columns. Their order in RevColumnsManager.activeColumns corresponds to the order in which they are displayed in the grid.
Do not change the contents of the RevColumnsManager.activeColumns list directly. Instead use RevColumnsManager functions such as:
Note that currently, focus and selection is not updated to reflect changes to active columns.
A column width can either be fixed or auto sizing. If it is auto sizing, then the width of the column will be automatically widened so that content of all visible cells in that column is fully displayed (up to the maximum size specified by the columnAutoSizingMax setting).
This automatic widening is done as part of rendering the cells. Whenever the grid is rendered, it calculates maximum size of the content of each cell rendered. From this it works out the minimum column size needed to fully display all its visible cells. If the column width is less than this minimum width and the column width is auto sizing, then the column's width is increased to this calculated minimum, and the grid is re-rendered.