Exemple #1
0
        protected virtual void OnDataRowsChanged(DataRowsChangedEventArgs args)
        {
            var dataRowsChanged = DataRowsChanged;

            if (dataRowsChanged != null)
            {
                dataRowsChanged.Invoke(this, args);
            }
        }
Exemple #2
0
        void DataSchema_DataRowsChanged(object sender, DataRowsChangedEventArgs args)
        {
            var changedRows = new HashSet <RedBlackTree <LongDecimal, RowItem> .Node>();

            foreach (var entity in args.Changed)
            {
                EntityRow entityRow;
                if (_entityRows.TryGetValue(entity, out entityRow))
                {
                    foreach (var childEntry in entityRow.Children)
                    {
                        changedRows.UnionWith(childEntry.Value.Select(row => (RedBlackTree <LongDecimal, RowItem> .Node)row.Data));
                    }
                }
            }
            var rowIndexes = changedRows.Select(row => row.Index).ToArray();

            Array.Sort(rowIndexes);
            Array.Reverse(rowIndexes);
            foreach (var index in rowIndexes)
            {
                BindingListView.ResetItem(index);
            }
        }