Esempio n. 1
0
        void table_RowDeleting(object sender, DataRowChangeEventArgs e)
        {
            if (validator.check(e.Row))
            {
                if (block())
                {
                    try
                    {
                        DataTable table   = e.Row.Table;
                        DataRow[] topRows = forTop.get(e.Row);
                        DataRow[] subRows = forSub.get(e.Row);
                        if (topRows != null && subRows != null)
                        {
                            for (int i = 0; i < topRows.Length; ++i)
                            {
                                if (object.ReferenceEquals(topRows[i], e.Row))
                                {
                                    for (int r = 0; r < subRows.Length; ++r)
                                    {
                                        subRows[r].Delete();
                                    }
                                }
                            }
                        }
                    }

                    finally
                    {
                        unblock();
                    }
                }
            }
        }
Esempio n. 2
0
        protected void table_RowChanged(object sender, DataRowChangeEventArgs e)
        {
            if (e.Action == DataRowAction.Add && validator.check(e.Row))
            {
                if (block())
                {
                    try
                    {
                        table_DistributeValues(forTop.get(e.Row), forSub.get(e.Row));
                    }

                    finally
                    {
                        unblock();
                    }
                }
            }
        }
 public override void activityForRow(DataColumnChangeEventArgs e)
 {
     touchCell(e.Row, e.Column.ColumnName);
     table_DistributeValues(selectorTop.get(e.Row), selectorBot.get(e.Row));
 }
Esempio n. 4
0
 public virtual void columnChange(DataColumnChangeEventArgs e)
 {
     toucher.touchCell(e.Row, e.Column.ColumnName);
     table_DistributeValues(selectorTop.get(e.Row), selectorBot.get(e.Row));
 }