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)
        {
            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.GetDataSourceDataMembers(obj);
                    }
                }
                catch
                {
                }
            }
            return(new StandardValuesCollection(values));
        }
 public int Add(DataBindingRuleBase value)
 {
     return(base.List.Add(value));
 }
 public void Remove(DataBindingRuleBase value)
 {
     base.List.Remove(value);
 }
 public DataBindEventArgs(DataBindingRuleBase dataBanding)
 {
     this.dataBinding = dataBanding;
 }