Home Forums WinForms controls Xceed Grid for WinForms columnManagerRow.Cells Alignment

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • User (Old forums)
    Member
    Post count: 23064
    #15620 |

    Hi,

    I am trying to set different alignments for a columnManagerRow but it does not seem to set the alignment. Is there a way to set different alignments for the column headers. The following is the code I have tried.

    Dim columnManagerRow As ColumnManagerRow = New ColumnManagerRow

    columnManagerRow.Height = 30
    columnManagerRow.AllowColumnReorder = False
    grid.FixedHeaderRows.Add(columnManagerRow)

    columnManagerRow.Cells(9).HorizontalAlignment = HorizontalAlignment.Right
    columnManagerRow.Cells(10).HorizontalAlignment = HorizontalAlignment.Left

    Thanks

    Andrew

    Imported from legacy forums. Posted by Andrew (had 1916 views)

    Xceed Support
    Member
    Post count: 5658

    I tried reproducing the error and I was not able.

    I was able to change the alignment of the cells from the columnManagerRow with 2 different approachs.

    First, through the columnManagerRow that is created when you drop the gridControl on the Form:

    <code>
    columnManagerRow1.Cells(5).HorizontalAlignment = Xceed.Grid.HorizontalAlignment.Right
    columnManagerRow1.Cells(4).HorizontalAlignment = Xceed.Grid.HorizontalAlignment.Left
    </code>

    Second, through the FixedHeaderRows collection, the columnManagerRow being the second FixedHeaderRow:

    <code>
    DirectCast(gridControl1.FixedHeaderRows(1), ColumnManagerRow).Cells(5).HorizontalAlignment = Xceed.Grid.HorizontalAlignment.Right
    DirectCast(gridControl1.FixedHeaderRows(1), ColumnManagerRow).Cells(4).HorizontalAlignment = Xceed.Grid.HorizontalAlignment.Left
    </code>

    Imported from legacy forums. Posted by CharlesB (had 3176 views)

Viewing 2 posts - 1 through 2 (of 2 total)
  • You must be logged in to reply to this topic.