Columns

Top  Previous  Next

Gets or sets the settings of the columns for the grid control.

[Visual Basic .NET]

Public Property Columns As System.Collections.CollectionBase

[C#]

public System.Collections.CollectionBase Columns {get; set;}

 

Remarks

Columns

 

From the screenshot above, you can see that each column has the following fields:

1. Alignment specifies the column text alignment, which can be Left, Center, or Right.

2. AllowSorting indicates whether it is allowed to sort the rows when the column header is mouse clicked. If the section(s) are present, the sorting will be applied against the child rows of each section.

3.CellEditType specifies the cell edit type for the grid in edit mode. It becomes irrelevant for the grid in readonly mode.

4. BackColor specifies the background color of the column header, and it becomes irrelevant if UseDefaultBackColor is TRUE.

5. ColumnTitle_1 specifies the 1st line of the column header.

6. ColumnTitle_2 specifies the 2nd line of the column header.

7. ColumnTitle_3 specifies the 3rd line of the column header.

8. ColumnTitle_4 specifies the 4th line of the column header.

9. ForeColor specifies the text color of the column header, and it becomes irrelevant if UseDefaultForeColor is TRUE.

10. GroupTitle specifies the group title of the column header.

11. UseDefaultBackColor indicates whether the background color of the column header is dictated by the GridBackColor property or not.

12. UseDefaultForeColor indicates whether the text color of the column header is dictated by the HeaderTextColor property or not.

13. Width specifies the width in pixels of the column.