I've got define a custom control which inherits from Windows ComboBox. It works fine with a bindingsource which is assigned to property "SelectedValue" (ComboBox.DataBindings.Add("SelectedValue", BindingSourceChld, bindFieldName)So far, so good but now I wanted to have the infragistics style in my custom Combo Box thus I change the Inherit type from System.Windows.Forms.ComboBox to Infragistics.Win.UltraWinEditors.UltraComboEditor.Now I don't have a "SelectedValue" property and no SelectedIndexChanged Event as well.What are the allocated Infragistics Properties/Events for that issue ?Or what is the typical why to define a bindingsource for Infragisitcs UltraComboEditor?
thx in advance
Frank Mainzer
Hi,
I'm not sure I understand what you are asking. The properties listed under DataBindings in the property grid allow you to bind those properties to a DataSource at design-time. You can't actually set the Value (or any) Property of the control under DataBindings - that's not what those properties are for. They are for setting up bindings.
I'm really not sure what you are trying to do or what the issue is, so it's hard to answer your question or give you any advice on this. Are you trying to bind the Value of the UltraCombo to a data source? That doesn't seem to have anything to do with the original question in this thread, so I'm kinda confused.
I noticed that in the properties (design-time) for the ComboEditor under the DataBinding node, you CAN set a Value. However, it does not seem to synch to the bindingsource it's set too.
If I set the Value in code using the DataBindings.Add method, it DOES work.
I know the IG docs say that this prop is available only at runtime, but it was a bit confusing to see it in the properties window. Note, when I hooked the Value prop in design time AND set it in code, I did get an error saying it was already set, so I'm not sure what's going on.
Any thoughts? I "assume" from my experience, that this Value property HAS to be set in code to work like the inbox ComboBox control's SelectedValue property, which IS exposed via design-time and run-time.
Yes.
Is that true for the WinCombo control too??
WinComboEditor has a Value property that is analagous to the ComboBox.SelectedValue property. To represent the SelectedIndexChanged event, you can listen to the ValueChanged event.