Beispiel #1
0
        protected override void OnItemCountChangeRequested(SelectAndDeleteExample adapter, int newCount)
        {
            base.OnItemCountChangeRequested(adapter, newCount);

            _CurrentFreeID = 0;
            adapter.LazyData.ResetItems(newCount, adapter.Parameters.freezeContentEndEdgeOnCountChange);
        }
Beispiel #2
0
        protected override void OnAddItemRequested(SelectAndDeleteExample adapter, int index)
        {
            base.OnAddItemRequested(adapter, index);

            // Insert for grids can only be done through a Reset, which NotifyListChangedExternally does
            adapter.LazyData.List.Insert(index, 1);
            adapter.LazyData.NotifyListChangedExternally(adapter.Parameters.freezeContentEndEdgeOnCountChange);
        }
Beispiel #3
0
        protected override void OnRemoveItemRequested(SelectAndDeleteExample adapter, int index)
        {
            base.OnRemoveItemRequested(adapter, index);

            if (adapter.CellsCount == 0)
            {
                return;
            }

            // Remove for grids can only be done through a Reset, which NotifyListChangedExternally does
            adapter.LazyData.List.Remove(index, 1);
            adapter.LazyData.NotifyListChangedExternally(adapter.Parameters.freezeContentEndEdgeOnCountChange);
        }