I saw a similar question, but mine is the opposite. I want the user to be able to enter into the combobox
so I have my UltraCombo as DropDown. Here's my problem. I have a BeforeDropDown event inside which I go to the database and load a datatable. Than I bind that datatable to the UltraCombo datasource. As soon as the DropDown Box opens, the current value is blanked out. Even though the current value exists in the list that was loaded. Anyone else having these problems
Hi,
I don't think this is a bug. The problem here is that you are setting the Value of the combo before it has a list. In DropDownList style, the combo can never have a value that does not exist on the list, and since your list is empty, the initial value of "a" you are applying in your sample doesn't really stick.
You need to bind the combo to a list before you can set it's value. Or you can use the SetInitialValue method, instead of setting the control's Value property.
//ultraCombo.Value = "a"; ultraCombo.SetInitialValue("a", "a");
It's been a while since I posted the sample and I haven't heard anything back. Has anyone looked into this issue? Can you confirm whether you are able to reproduce the problem? Can we expect a fix in upcoming releases?
Thanks,
This issue dates back at least a couple of years as evident by this thread and this other thread http://forums.infragistics.com/forums/p/44392/242028.aspx
I've attached a very simple project that demonstrates the bug and the workaround to make it work.
Well, if it's all strings, then I can't see any reason why that should be happening.
Either something in your code is clearing the Text or the Value. Or else this is a bug in that old version of the control that only happens under some particularly obscure circumstances, since I've never heard any other reports of an issue like this.
If you can post a small sample application that demonstrates the behavior, I'd be happy to take a look and tell you exactly what's happening.
If that's no possible, then my next suggestion is to comment out any code you have in any of the UltraCombo's event handlers and see if that fixes it. If it does, you know it's a problem with the code.
If that doesn't help, then you could try updating to the latest rervice release.
How to get the latest service release - Infragistics Community
The combo data source is a single string column DataTable and both ValueMember and DisplayMember set to the same column name. The Value property is set to a string which is contained in the DataTable.
Using the workaround that rpgCoder suggested (storing the Value in BeforeDropDown and setting it again in AfterDropDown) works but it's a "hack" that I'd rather not use.