vb.net - BindingSource - can't navigate after deleting record unless I commit -
i using bindingsource navigate through datatable in dataset. have custom back, forward, delete, , new buttons. have working except delete button.
after delete row, row stays in bindingsource (marked "deleted") until commit changes. understand this, problem not want commit changes right after user deletes record. have opportunity add , delete multiple records , click "save" or "cancel" button commit changes @ once.
so after delete row using delete button, can't navigate through records anymore because row has been marked deletion still "exists", error "deleted row information cannot accessed through row" when navigate through records , forward because record marked deletion still able navigate through in bindingsource.
it's want have bindingsource bound non-deleted records only. way, when user deletes record, no longer seen in bindingsource gets deleted when commit datatable changes.
also, proper way remove row?:
binder.removeat(binder.position)
thanks help.
Comments
Post a Comment