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
The Combo should not blank out in DropDown style, even if the item does not exist on the list.
What version are you using?
Can you create a small sample project demonstrating this?
I still see this behavior in Infragistics 10.2. BeforeDropDown sets the DataSource and right after DataSource is set the Value is still preserved. However, sometime later the internal DoDropDown method seems to clear it.
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.
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
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.
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,
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");
Hello,
This issue has been resolved in the latest service release as of 1/4/2012. You can download the Service Release from your My Keys & Downloads page: https://es.infragistics.com/Membership/Default.aspx?panel=Downloads#Downloads
I have logged this as a development issue with an ID# of 96044. I will make another post once this issue has been resolved.
I will be happy to help you out with this issue.
I have created case # CAS-77063-KM3PFG for you to better assist you with this issue going forward. To access the case, simply log into your IG account and click on My Support Activity.
Please let me know if you have further questions in this matter utilizing the case created.
Oops, sorry about that. I misread the code.You are right, this does seem like a bug in that case.
I'm going to forward this thread over to Infragistics Developer Support so they can create a case for you and look into this issue more thoroughly.
Hi Mike, thanks for looking into this. I'm afraid, though, that it is a bug. What you're saying is correct if the combo was, in fact, using DropDownList style. But if you look at the sample, you'll notice that it's specifically set to DropDown style. So the value can be anything.