Home Forums WinForms controls Xceed Grid for WinForms Need help alligning a gridcombobox’s contents to the left.

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

    I am using this code to create a gridcombobox in a couple columns of my grid.

    gridComboBox1.DataSource = m_dtVerified
    gridComboBox1.DisplayMember = “VerificationType”
    gridComboBox1.ValueMember = “VerificationTypeID”
    XceedPatronGrid.Columns(“VerificationTypeID”).CellEditor = gridComboBox1
    XceedPatronGrid.Columns(“VerificationTypeID”).CellViewer = gridComboBox1

    Now, it seems the default is the contents are right justified. How do I change that to being Left justified in the combo box?

    Imported from legacy forums. Posted by hellswraith (had 2412 views)

    User (Old forums)
    Member
    Post count: 23064

    Solved it,

    In case anyone else has this question:
    XceedPatronGrid.Columns(“VerificationTypeID”).HorizontalAlignment = HorizontalAlignment.Left
    gridComboBox1.DataSource = m_dtVerified
    gridComboBox1.DisplayMember = “VerificationType”
    gridComboBox1.ValueMember = “VerificationTypeID”
    XceedPatronGrid.Columns(“VerificationTypeID”).CellEditor = gridComboBox1
    XceedPatronGrid.Columns(“VerificationTypeID”).CellViewer = gridComboBox1

    it is the HorizontalAlignment of the column.

    Imported from legacy forums. Posted by hellswraith (had 3438 views)

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