True DBGrid for WinForms | ComponentOne
Customization / Unpopulated Regions
In This Topic
    Unpopulated Regions
    In This Topic

    Depending upon the number of rows and columns in the data source, a portion of the grid's interior may not contain data cells. However, these "dead zones" can be eliminated using the ExtendRightColumn and EmptyRows properties. Change the color of the dead areas by using the BackColor property.

    The Rightmost Column

    As the grid scrolls horizontally until the last column is totally visible, there is usually a blank area between the last column and the right border of the grid.

    The color of this blank area depends on the setting of your system's 3D Objects color (or Button Face color). Eliminate this blank area with the ExtendRightColumn property. The default value of this property is False, but if set it True, the last column will extend its width to the right edge of the grid.

    Unused Data Rows

    If the data source contains fewer rows than the grid can display, the area below the AddNew row (or the last data row, if AllowAddNew is False) is left blank.

    The color of this blank area depends on the setting of your system's 3D Objects color (or Button Face color). Eliminate this blank area with the EmptyRows property. The default value of this property is False, but if set to True, the grid will display empty rows below the last usable data row.

    Note that the empty rows cannot receive focus.

    Both the EmptyRows and ExtendRightColumn properties can be set to True to ensure that no blank areas appear within the interior of the grid.