Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
260
Binding To Value On UltraCombo
posted

Hi,

I'm trying to bind to the selected item in an UltraCombo.  After reading some posts that encouraged me to set the ValueMember = Infragistics.Win.BindableValueList.USE_LISTOBJECT_AS_VALUEMEMBER, I thought i was getting closer. 

Now I find myself in the situation where I've tried the following

Declare the Selected Object

        private DataObject _selectedComboDataObject;
        public DataObject SelectedComboDataObject
        {
            get { return _selectedComboDataObject; }
            set
            {
                _selectedComboDataObject = value;
                NotifyPropertyChanged();
            }
        }

and set up the UltraCombo's data bindings to its data source, and an attempt at binding to the SelectedComboDataObject.

(this is done in the constructor after the InitializeComponent Method is called)

ultraCombo1.DisplayMember = "Prop2";
ultraCombo1.SetDataBinding(DataObjects, null);
ultraCombo1.ValueMember = Infragistics.Win.BindableValueList.USE_LISTOBJECT_AS_VALUEMEMBER;
Binding c = new Binding("Value", this, "SelectedComboDataObject", false, DataSourceUpdateMode.OnPropertyChanged);
ultraCombo1.DataBindings.Add(c);

I've included my sample w/ the "DataObject" class and the population of the "DataObjects" binding list.

thank you very much.

IngfragisticsBinding.zip
Parents Reply Children