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
Hello,
Thank you for posting on our forums.
When do you add the information to the cell? Can you try doing it during InitializeLayout event?
Also, if you just need a dropdown, using valueList is much better. The documentation has been archived on our website, but using this link should open it:
https://web.archive.org/web/20160428074330/http://devcenter.infragistics.com/Support/KnowledgeBaseArticle.aspx?ArticleID=7841
Please let me know if you need further information.
Sincerely,
Tihomir TonevSoftware DeveloperInfragistics
Hello, Tihomir, I was not able to get this working. At the end I used a function that someone created internally that returns the combobox created and with that it worked, thanks.