Hi guys,
I'm populating a datagridview using a dataview which has been filtered. This works fine. What I've been trying to do for some time now is simply edit value in the datagridview and save these do an access database. I have tried using a dataset to update but with no success. Since I'm not using a dataset to populate the datagridview then i presume i need to use the datatable, dataadapter and dataview which i have used to populate, in order to update. I can't get this working.
thanks, help would be much appreciated
I'm populating a datagridview using a dataview which has been filtered. This works fine. What I've been trying to do for some time now is simply edit value in the datagridview and save these do an access database. I have tried using a dataset to update but with no success. Since I'm not using a dataset to populate the datagridview then i presume i need to use the datatable, dataadapter and dataview which i have used to populate, in order to update. I can't get this working.
VB.NET:
strConnectionString.Open()
Dim tblDataTable As New DataTable("Tasks")
daDataAdapter3.Fill(tblDataTable)
Dim dvDataView As DataView
dvDataView = New DataView
dvDataView.Table = tblDataTable
dvDataView = New DataView(tblDataTable)
' filter the dataview to only display invoices for this ID
dvDataView.RowFilter = "InvoiceID =" & " " & invID & ""
' Bind DataView to the DataGrid
dgTrackingCurrentInvoice.DataSource = dvDataView
' don't display the columns
dgTrackingCurrentInvoice.Columns("InvoiceID").Visible = False
' close the connection
strConnectionString.Close()
thanks, help would be much appreciated