zaceverett
asked on
Find & Edit a row in a datatable
I am trying to find and edit a row in a datatable.
I set up a new datarow dr.
dr = catalogues.CatalogueTypes. Rows.Find( oldCatalog ueIDCode)
Great this gets me the datarow to edit, then i
dr.BeginEdit()
dr(catalogues.CatalogueTyp es.Catalog ueIDColumn .ColumnNam e) = newCatalogueIDCode
This gives the new datarow dr a new catalogueid in the catalogueidcolumn
I then try and accept the changes
dr.AcceptChanges()
catalogues.CatalogueTypes. AcceptChan ges()
BUT the dataset doesn't get updated or changed just the datarow dr.
If i specify directly the datarow eg.
dr = catalogues.CatalogueTypes. Rows(2)
This works no problems.
So, how do i find a row given a value and then edit it in the datatable and acceptchanges.
Thank you for any help.
Zac
I set up a new datarow dr.
dr = catalogues.CatalogueTypes.
Great this gets me the datarow to edit, then i
dr.BeginEdit()
dr(catalogues.CatalogueTyp
This gives the new datarow dr a new catalogueid in the catalogueidcolumn
I then try and accept the changes
dr.AcceptChanges()
catalogues.CatalogueTypes.
BUT the dataset doesn't get updated or changed just the datarow dr.
If i specify directly the datarow eg.
dr = catalogues.CatalogueTypes.
This works no problems.
So, how do i find a row given a value and then edit it in the datatable and acceptchanges.
Thank you for any help.
Zac
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.