public virtual void Remove(int index) { //geometries.RemoveAt(index); FeatureDataRow featureDataRow = (FeatureDataRow)attributesTable[index]; attributesTable.RemoveRow(featureDataRow); }
public void RemovingRowFromTableTriggersViewListChangedItemDeletedNotification() { FeatureProvider data = DataSourceHelper.CreateFeatureDatasource(_factories.GeoFactory); FeatureDataTable table = new FeatureDataTable(_factories.GeoFactory); IExtents halfBounds = data.GetExtents(); halfBounds.Scale(0.5); FeatureQueryExpression query = FeatureQueryExpression.Intersects(halfBounds); IFeatureDataReader reader = data.ExecuteFeatureQuery(query); table.Load(reader, LoadOption.OverwriteChanges, null); FeatureDataView view = new FeatureDataView(table); Boolean addNotificationOccured = false; view.ListChanged += delegate(Object sender, ListChangedEventArgs e) { if (e.ListChangedType == ListChangedType.ItemDeleted) { addNotificationOccured = true; } }; FeatureDataRow row = table[0]; table.RemoveRow(row); Assert.True(addNotificationOccured); }