I'm using XtraGrid (devexpress.com) with data adapter model
,when I select row then click [-] delete navigator (DevExpress.XtraEditors.NavigatorButton) data record delete from xtragrid but can not delete from entity collection when adapter.SaveEntityCollection
adapter.StartTransaction(IsolationLevel.ReadCommitted, "Edit Data");
GrBankAccCollection = new EntityCollection(new BankaccEntityFactory());
RelationPredicateBucket bucket = new RelationPredicateBucket();
bucket.PredicateExpression.Add(PredicateFactory.CompareValue(BankaccFieldIndex.CompanyId, ComparisonOperator.Equal, SetCompanyID.ToString()));
GrBankAccCollection.AllowRemove = true;
adapter.FetchEntityCollection(GrBankAccCollection,bucket);
BankAccGrid.DataSource = GrBankAccCollection;
I select row then click delete navigator then data record delete from grid complete ,data is not display in grid when clieck delete but
adapter.SaveEntityCollection(GrBankAccCollection);
adapter.Commit();
Data record is not delete from table of sql database. (sql2000)
when I move xxxx.AllowRemove = true; to after FetchEntityCollection
Data record is not delete from database table too.
adapter.FetchEntityCollection(GrBankAccCollection,bucket);
GrBankAccCollection.AllowRemove = true;
BankAccGrid.DataSource = GrBankAccCollection;