Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Fill Ultracombo from list in UltraGrid
posted

I have the following code to add a combobox in a grid cell, my problem is that as you can see en the image, it is displayed empty:

I have the following class:

Public Class Priority
        Public Code As String
        Public Abbr As String
End Cllass

I am feeling a list:

Dim priorityEditor As New List(Of Priority)()
priorityEditor.Add(New Priority With {.Code = "High", .Abbr = "High"})
priorityEditor.Add(New Priority With {.Code = "Medium", .Abbr = "Medium"})
priorityEditor.Add(New Priority With {.Code = "Low", .Abbr = "Low"})
priorityEditor.Add(New Priority With {.Code = "Not Ready", .Abbr = "Not Ready"})
priorityEditor.Add(New Priority With {.Code = "Ready", .Abbr = "Ready"})
priorityEditor.Add(New Priority With {.Code = "Missed", .Abbr = "Missed"})

I create the dropdown

Dim priorityDropDown As New UltraCombo With {
                    .Width = 200,
                    .DataSource = priorityEditor,
                    .ValueMember = "Abbr",
                    .DisplayMember = "Abbr"
                }

And Finally add it to the cell

Me.DisplayLayout.Bands(0).Columns("PriorityName").EditorComponent = priorityDropDown
                Me.DisplayLayout.Bands(0).Columns("PriorityName").Style = ColumnStyle.DropDownList

What am I missing?

Thank you

Parents
No Data
Reply Children