Home Forums WinForms controls Xceed Grid for WinForms ComboBox Editor won’t appear

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

    Ok, this should be an easy one. I am simply trying to get a combo box editor to work. I followed the sample code exactly and when I run it nothing shows up in the column with the combo. If I try to edit it, nothing happens.

    Here is my code.

    <color=”green”>
    Private Sub BuildRows()
    If _AccountTypes Is Nothing Then
    _AccountTypes = AccountTypeCommand.LoadAccountTypes()
    End If

    For Each cd As ClassificationData In _ClassData

    Dim row As Xceed.Grid.DataRow = gridClassifications.DataRows.AddNew()
    row.Cells(UIConstants.ClassificationColumns.ClassID).Value = cd.ID
    row.Cells(UIConstants.ClassificationColumns.ClassDescription).Value = cd.Description

    ‘need a combo box editor for this one
    Dim simpleComboBoxEditor As New ComboBoxEditor(_AccountTypes, “Table”, “ACCOUNT_TYPE”)
    XceedGridVistaStyle.SetWinComboBoxStyle(simpleComboBoxEditor.TemplateControl)
    simpleComboBoxEditor.TemplateControl.DropDownSize = New Size(50, 150)
    row.Cells(UIConstants.ClassificationColumns.AccountType).CellEditorManager = simpleComboBoxEditor

    ‘This ain’t working at the moment..
    row.Cells(UIConstants.ClassificationColumns.AccountType).CellViewerManager = New ComboBoxViewer(_AccountTypes, “Table”, “ACCOUNT_TYPE”)
    row.Cells(UIConstants.ClassificationColumns.AccountType).Value = cd.AccountType

    row.Tag = cd

    row.EndEdit()
    Next
    End Sub
    </color>

    The _AccountTypes variable is simply a dataset with my goodies.

    I noticed that if I comment out the line under “This ain’t working at the moment” that the data from my database will appear, but I still get no combo (which makes sense in that case).

    Anyways, I hope someone can help. I am guessing it is something stupid.

    David

    Imported from legacy forums. Posted by flyingpenguin (had 2423 views)

    User (Old forums)
    Member
    Post count: 23064

    Is there noone who can help me with this?

    David

    Imported from legacy forums. Posted by flyingpenguin (had 256 views)

    User (Old forums)
    Member
    Post count: 23064

    It is possible that the ValueMember (Account_Type) is not the same type as the column, thus the editor cannot be displayed?

    You can send a sample application that reproduces the problem to <a href=”mailto:support@xceedsoft.com”>support</a> if you can’t find a solution.

    Imported from legacy forums. Posted by André (had 3248 views)

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