Vb net 2010 get first row of dataset4/1/2024 ![]() I see, I think that makes sense to me now. This posting is provided "AS IS" with no warranties, and confers no rights. If grid is bound to the DataTable then grids index is going to match row index in DataTable.DefaultView but not the DataTable itself. ![]() In this case you’re trying to remove row which is not even in collection, hence the exception.Īnother important thing to remember while working with DataTable and DataGrid: row index in the grid is not the same as row index in the DataTable. You should not remove rows from the collection, it would break database synchronization. So you should never call AcceptChanges() unless you’re writing your own data adapter or working without database. ![]() If row is just gone then there's no way it would be deleted from the database. Yes, Delete() only mark row as deleted so DataAdapter know to update the database. ![]()
0 Comments
Leave a Reply.AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |