ComponentOne True DBGrid for WinForms
Data Presentation Techniques / Data Display / Multiple Line Data Display
In This Topic
    Multiple Line Data Display
    In This Topic

    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:

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


    You can adjust resulting column layout 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 that you can specify a multiple line mode in which the grid does scroll horizontally by setting the DataView property to DataViewEnum.MultipleLinesFixed, see Multiple Line Fixed Data Display for more information.

    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.
    See Also