ComponentOne True DBGrid for .NET (2.0) Search HelpCentral 

Multiple Line Data Display

Normally, a record is displayed in a single row in the grid. If the grid is not wide enough to display all of the columns in the record, a horizontal scroll bar automatically appears to enable users to scroll columns in and out of view. For discussion purposes, the following will be distinguished:

·      A line in a grid is a single physical row of cells displayed in the grid. Do not confuse this with a line of text inside a grid cell; depending upon the settings of the RowHeight and WrapText properties, data in a grid cell may be displayed in multiple lines of text.

·      A row in a grid is used to display a single record. A row may contain multiple lines or multiple physical rows.

Setting the DataView property to DataViewEnum.MultipleLines will display every field of data in the dataset in the available grid area. Ultimately, if the dataset contains more fields than can fit in the grid area, then a single record will span multiple lines. This feature enables the end user to view simultaneously all of the columns (fields) of a record within the width of the grid without scrolling horizontally, as in the following figure:

If the resulting column layout is not appropriate, adjust it at either design time or run time by changing the widths and orders of the columns. When changing the width of a column, the grid will only increase the size of the column at the expense of the other columns in the line. Unlike previous versions of the grid, the columns will not wrap to another line if a column is resized.

To change the order of the columns while in MultipleLine view, click and drag the column header to the new position. A red arrow should indicate where the column is to be placed. After the column has been dropped, the grid will reposition the columns accordingly.

Note: At design time, if the HScrollBar and VScrollBar style property is set to ScrollBarStyleEnum.Automatic, and the DataView property is set to DataViewEnum.MultipleLines, a vertical scroll bar appears even though no data is displayed. This is done so the width of the scroll bar can be taken into account when adjusting columns at design time.


Implications of Multiple-Line Mode


Send comments about this topic to ComponentOne.
Copyright © ComponentOne LLC. All rights reserved.