In my project, I have INGRAGISTICS 11.1 version. I’m getting the issue in UltraCombo control. Unable to tab out from control.
When we try to find the cause, we observed that OnValidating is failing (always e.cancel = true is returning).
I have XML entity data binding, in my form.
Binding sample code:
this.cmbListC.DataBindings.Add("Value", xKey, "InnerXml");
this.cmbListC.DataBindings.Add("Text", xValue, "InnerXml");
Why always e.cancel is retuning true when data source is null.
Thanks for straightening me out. I don't know what I was thinking trying to make it more complex than it needed to be.
Milk, i have attached the sample project with two UltraCombo controls & one UltraTextEditor. navigation from first combo to second combo is fine but from second combo to text box giving issue. i want solution for this.
A better way to do it would be to remove the State column entirely, since it is redundant. Then you attach the combo to the StateID column. Set the combo's ValueMember to the StateId and it's DisplayMember to the State and the combo will handle translating the ID to the State so the user sees the names and the ID's are saved (by binding the Value of the control).
That's the way it's usually done.
In theory, your way might work - especially if it used to work. But again, in order to figure out why it's not working, I'd need to be able to debug a working sample.
I would have a hidden column called StateId and a visible column called State. The State column has the ValueList you described attached to it.
When the user selects a ValueListItem from the combo, I must copy the Value to the StateId hidden column's Value so the database will be updated properly. The State is not stored in the database, just the StateId.
I use the grid's AfterCellListCloseUp event to do this, but I think it fires only with mouse usage, not keyboard input.
Hi Lars,
I'm sorry, but I do not understand what you are asking.
Typically, the Combo is used to choose a value in a table. For example, suppose you have a table of addresses. Each address has a field for State. But storing the entire name of the state in each address would be inefficient. So you would probably use some ID for each state - maybe a numeric ID, or the state abbreviation.
So your states table might look like this:
Id Name Abbreviation
1 Alabama AL2 Alaska AK3 Arizona AZ4 Arkansas AR5 California CA6 Colorado CO...46 Virginia VA47 Washington WA48 West Virginia WV49 Wisconsin WI50 Wyoming WY
Your UltraCombo's DataSource would point to the table. Your ValueMember would probably be the Key (or possibly the Abbreviation) and your DisplayMember would be the Name. This would display the user-friendly name of the state while storing the Id/Abbreviation in the Combo's Value.
Your address field would probably have either the key or the Abbreviation. But it doesn't make sense for the Address to contain both the key and the Name, since the Name can be retrieved via the key at any time. Storing both could lead to data corruption. For example, if you changed the name of a state for some reason - you would have to update the entire Address table every time that name appeared instead of just in one place.
So I don't really understand why you would want to bind two fields from the same control to on table when those two fields are inextricably linked like Value and Text in the combo.
If I am wrong, and there is some reason why you need this, then I will need to see a small sample project demonstrating the problem in order to be able to assist you, because I can't guess why it's not working without seeing it and debugging it.