protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            base.OnSetComplete(index, oldValue, newValue);
            DataBindingRuleBase dataBindingRuleBase = newValue as DataBindingRuleBase;

            if (dataBindingRuleBase != null && string.IsNullOrEmpty(dataBindingRuleBase.DataMember))
            {
                dataBindingRuleBase.DataMember = DataBindingHelper.GetDataSourceDefaultDataMember(dataBindingRuleBase.DataSource);
            }
        }
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            ArrayList values = new ArrayList();

            if (context != null && context.Instance != null && context.Instance is DataBindingRuleBase)
            {
                try
                {
                    object obj = null;
                    DataBindingRuleBase dataBindingRuleBase = (DataBindingRuleBase)context.Instance;
                    obj = dataBindingRuleBase.DataSource;
                    if (obj != null)
                    {
                        values = DataBindingHelper.GetDataSourceDataFields(obj, dataBindingRuleBase.DataMember, string.Empty);
                    }
                }
                catch
                {
                }
            }
            return(new StandardValuesCollection(values));
        }
Esempio n. 3
0
        public override StandardValuesCollection GetStandardValues(ITypeDescriptorContext context)
        {
            StringCollection values = null;

            if (context != null && context.Instance != null && context.Instance is DataBindingRuleBase)
            {
                try
                {
                    object obj = null;
                    DataBindingRuleBase dataBindingRuleBase = (DataBindingRuleBase)context.Instance;
                    obj = dataBindingRuleBase.DataSource;
                    if (obj != null)
                    {
                        values = DataBindingHelper.GetDataSourceCoordinateFields(obj, dataBindingRuleBase.DataMember, dataBindingRuleBase.BindingField);
                    }
                }
                catch
                {
                }
            }
            return(new StandardValuesCollection(values));
        }
Esempio n. 4
0
 public DataBindEventArgs(DataBindingRuleBase dataBanding)
 {
     dataBinding = dataBanding;
 }
 public void Remove(DataBindingRuleBase value)
 {
     base.List.Remove(value);
 }
 public int Add(DataBindingRuleBase value)
 {
     return(base.List.Add(value));
 }