I have an ultraCombo.
Let's say it's binded to a name property.
when the name is empty (string.empty), it will display the value of ValueMember. Which I don't want. I want it to just display a string.empty.
Okay, I do see the behavior you describe with UltraComboEditor. This might be a bug, I'm not sure.
I will forward this over to Infragistics Developer Support so they can check it out.
In the mean time, you could use a single space characters instead of an empty string. Or you could use UltraCombo instead of UltraComboEditor.
I think I mention the wrong control. I'm not using the UltraCombo, BUT the UltraComboEditor.
Try the test with UltraComboEditor instead.
Sorry about the confusion. We are using 8.3
GoDaddy said:No I'm not binding the Text property at all.
Oh, okay. When you said "Let's say it's binded to a name property." I assumed you meant you were binding the control, not the list, since the list doesn't bind to a single property.
GoDaddy said:Now when the name is string.empty, it shows the ID which is a GUID in my case instead of an empty string ......
What version of the controls are you using? Like I said, I tested this out and it worked fine for me. Perhaps you could post a small sample project demonstrating this behavior.
Hi Mike,
No I'm not binding the Text property at all. Only using the ValueMember and DisplayMember.
ValueMember = "Id"
DisplayMember = "Name"
Now when the name is string.empty, it shows the ID which is a GUID in my case instead of an empty string ......
I'm not sure I understand. It sounds like you have a list of IDs and display texts, so you are using ValueMember and DisplayMember. But then you are binding the Text property of the Combo to a name field? That doesn't make sense - you should be binding the ValueMember field, the Id, not the text.
I tested this out, binding the combo to a list of IDs and display texts and then setting the text to an empty string (which is what binding the Text property would do) and it works just fine for me.