I'm having a heck of a time getting this to work. I am using an UltraCombo as the EditorControl in a grid cell. I'm using this because I need to display multiple columns in the dropdown. Also, each row has to have a different DataSource for the UltraCombo.
I have assigned the DataSource for the UltraCombo (it is valid, with rows as expected), but the displayed text in the cell is just the value, not the specified display column, and when clicking the dropdown in the cell, no content is shown.
I have never used the UltraCombo in this scenario before..
Here's code I have setting the valuelist and EditorControl in the grid's InitializeRow event. I've also tried this in the AfterRowActivate event handler to the same result.
Me.cboAccount.DataSource = CurrentRowDataTable
Me.cboAccount.DisplayMember = "AccountName"
Me.cboAccount.ValueMember = "AccountID"
e.Row.Cells("AccountID").EditorControl = Me.cboAccount
Probably missing something obvious... Thanks in advance..
My best guess is that you are creating the UltraCombo control in code and you are never adding it to the Controls collection on the form. It therefore has no BindingContext, so it cannot get any data. It will also not be disposed with the form unless you add it to the Controls collection, so this is a good idea to do, anyway.
Mike,
Thanks for the response. However, I am adding it to the design surface. Any other ideas what might be going on here?
Thanks.