Пример #1
0
 protected virtual void OnColumnDataChanged(Column.ColumnDataChangedEventArgs eventArgs)
 {
     if (ColumnDataChanged != null)
     {
         ColumnDataChanged(this, eventArgs);
     }
 }
Пример #2
0
        private void column_DataChanged(object sender, Column.ColumnDataChangedEventArgs e)
        {
            OnColumnDataChanged(e);

            if (_inColumnsChanged)
            {
                return;
            }
            _inColumnsChanged = true;
            try
            {
                switch (e.WhatChanged)
                {
                case Column.WhatPropertyChanged.IsGroup:
                    if (e.Column.IsGrouped)
                    {
                        _groupedItems.Add(e.Column);
                    }
                    else
                    {
                        _groupedItems.Remove(e.Column);
                    }
                    break;

                case Column.WhatPropertyChanged.IsVisible:
                    if (e.Column.IsVisible)
                    {
                        _visibleItems.Add(e.Column);
                    }
                    else
                    {
                        _visibleItems.Remove(e.Column);
                    }
                    break;
                }
            }
            finally
            {
                _inColumnsChanged = false;
            }
        }