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.
Are you binding both the Value and Text properties of the control to different fields? That doesn't make sense and it might be the cause of the problem.
The Value and the Text are linked together. In fact, they are always the same value in the UltraTextEditor and are not stored separately. So unless your "xValue" and "xKey" values are always exactly the same, this will cause a problem. Even if they are not the same, editing the UltraTextEditor will end up trying to update both fields to the same value, which makes the value redundant at the very least and potentially dangerous at worst.
Try binding either the Value or the Text and not both and see if that helps. If not, and you still see the problem when bound to only one field, then my guess is that your data source is not updateable or cannot accept the current value of the UltraTextEditor for some reason.
Mike, we are binding both Text & Value properties of the control to the different fields. and important one is, the control, its not UltraTextEditor its UltraCombo.
i want to bind both text & value, because i want to update both in database.
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.
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.
Hello Durga,
The issue seems to be related to setting the DropDownStyle to DropDownList. I changed it back to it's default and I was able to tab through the controls. The editor is filled with "(none)" though. I'm still investigating this.
Hi Michael, if i change DropDownStyle to DropDown it's working fine but with this default style, control allowing user to enter text but my requirement is no not to allow any text.
I have a strong feeling that in 7.1 there were issues with validating. The reason I bring this up is because the control is designed to validate when you try to leave focus. Because there isn't a value it won't let you leave focus until you do something. Normally if a control is empty it should be read-only so the end user cannot enter edit mode and to specifically avoid these types of situations. I strongly recommend not having the combo present or be interacted with if it's empty.
You can toggle off the validation with the CausesValidation property set to false to address this behavior.
cmbListB.CausesValidation = false;
Let me know if you have any questions regarding this matter.
Durga,
Only set it to false when there isn't a value. Perform a if check and when the combo is provided a value the value changed event will fire. There you can enable Validation and continue as planned. You won't need validation when there isn't a value right?
Michael, setting the property CausesValidation to 'false' will skip the control Validating & Validated events.
but in this events i have some logic. now it is not invoking. so what is the solution for this.