I thought that Column.Alignment applies to the whole column , but it is only to a header. What can I do?
The Column.Alignment property aligns the whole column. The problem you have encountered is that the column that paints the hierarchy ( the TreeColumnIndex property specifies the index of the column where the hierarchy is painted ) can’t be centered, so you need to call: With Grid1 .TreeColumnIndex = -1 End With in case you are using the control to load a flat table. By default, the TreeColumnIndex is 0, and it points to the first column of the control. Use the Column.HeaderAlignment property to align the column’s header.
Related Questions
- The column width of the header on the Create ASN page is so wide they some people do not realize that there is a second column. Can these columns be made narrow?
- I thought that Column.Alignment applies to the whole column , but it is only to a header. What can I do?
- How do I perform custom handling of a double-click in a DataGrids column header cell?