What's new in EhLib.VCL 11.1
What's new in EhLib.VCL 11.1
Multi-column mode in TDBVertGridEh
Multi-column mode in TDBVertGridEh control
The VisibleColCount property has been added to the TDBVertGridDataColParamsEh class. Now, using the TDBVertGridEh.DataColParams.VisibleColCount grid property, you can set the number of visible columns in the grid.
By assigning values to the TDBVertGridEh.DataColParams.VisibleColCount and TDBVertGridEh.DataColParams.ColWidth properties, you can set different display modes for columns and column widths.
Mode 1: DataColParams.VisibleColCount = 1 and DataColParams.ColWidth = 0
Default mode. As before, the grid displays one column of data. The column width adjusts to take up all the free space in the visible area of the grid.
Mode 2: DataColParams.VisibleColCount = 1 and DataColParams.ColWidth > 0
The grid displays one column of data. The column width is set by the width specified in the DataColParams.ColWidth property.
Mode 3: DataColParams.VisibleColCount = 0 and DataColParams.ColWidth = 0
The number of grid columns is equal to the number of records in the DataSet. The width of the columns adjusts to take up all the free space in the visible area of the grid.
Mode 4: DataColParams.VisibleColCount = 0 and DataColParams.ColWidth > 0
The number of columns is formed automatically depending on the amount of data in the DataSet and the type of the DataSet. For TMemTableEh, the number of columns is the same as the number of records. For other types of DataSets, the number of columns is determined by the number of visible columns in the grid visible area. The width of the columns is set by the width specified in the DataColParams.ColWidth property.
Mode 5: DataColParams.VisibleColCount > 1 and DataColParams.ColWidth = 0
The number of columns is set by the VisibleColCount parameter. The width of the columns is adjusted to take up all the free space in the visible area of the grid.
For an example of using the DataColParams.VisibleColCount and DataColParams.ColWidth properties, see the Demo project in the Demos\DBVertGridEh.MultiColumnMode\ folder.
New features in TPivotGridEh
The following features have been added to TPivotGridEh.
Changes in the OnDrawDataCell event, the Params parameter has changed from type TPivotCellDrawParamsEh to type TPivotCellDataValueDrawParamsEh. If you use the TPivotGridEh.OnDrawDataCell event, then change the parameter type in the sources of your project var Params: TPivotCellDrawParamsEh to the type var Params: TPivotCellDataValueDrawParamsEh.
Ability to wrap text to a new line when the text in the cells of the axes does not fit in width, but there is space in height.
To enable text wrapping in cells, set the TPivotGridEh.RowAxisOptions.AutoWordWrap property for row axis cells or TPivotGridEh.ColumnAxisOptions.AutoWordWrap for column axis cells.
Ability to display Total cells at the level of Child elements.
To activate the display mode of Total cells at the level of Child elements, set the TPivotGridEh.RowAxisOptions.TotalAtParentLevel property to False for row axis cells or TPivotGridEh.ColumnAxisOptions.TotalAtParentLevel to False for column axis cells.
Ability to display Total cells before cells with data.
To activate the mode of displaying Total cells before cells with data, set the TPivotGridEh.RowAxisOptions property. TotalsBeforeData = True for row axis cells, or TPivotGridEh.ColumnAxisOptions.TotalsBeforeData = True for column axis cells.
The ability to automatically increase the height of the cell to fit all the text in the cell.
To activate the automatic grid height increase mode, set the property TPivotGridEh.RowAxisOptions.HeightAutoExpand = True for row axis cells or TPivotGridEh.ColumnAxisOptions.HeightAutoExpand = True for column axis cells.
Ability to arrange multiple data cells (when the TPivotDataSourceEh.ValueFieldDefs collection contains multiple values) in a vertical row section.
To activate the mode of arranging multiple cells with data vertically, set the pgoMultiValuesInRowsAxisEh value in the TPivotGridEh.Options property.
