public int Add(string name)
        {
            ActionRow newRow = new ActionRow();

            newRow.Name = name;

            return(Add(newRow));
        }
        public object AddNew()
        {
            ActionRow newRow = new ActionRow();

            List.Add(newRow);

            return(newRow);
        }
        protected override void OnRemoveComplete(int index, object value)
        {
            ActionRow oldRow = (ActionRow)value;

            oldRow.EditCancelled -= new EventHandler(EditCancelledHandler);

            OnListChanged(new ListChangedEventArgs(ListChangedType.ItemDeleted, index));

            base.OnRemoveComplete(index, value);
        }
        protected override void OnInsertComplete(int index, object value)
        {
            ActionRow newRow = (ActionRow)value;

            newRow.EditCancelled += new EventHandler(EditCancelledHandler);

            OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));

            base.OnInsertComplete(index, value);
        }
        protected override void OnSetComplete(int index, object oldValue, object newValue)
        {
            if (oldValue != newValue)
            {
                ActionRow oldRow = (ActionRow)oldValue;
                ActionRow newRow = (ActionRow)newValue;

                oldRow.EditCancelled -= new EventHandler(EditCancelledHandler);
                newRow.EditCancelled += new EventHandler(EditCancelledHandler);

                OnListChanged(new ListChangedEventArgs(ListChangedType.ItemAdded, index));
            }

            base.OnSetComplete(index, oldValue, newValue);
        }
 public int Add(ActionRow row)
 {
     return(List.Add(row));
 }