Hi All
Still playing about with Datasets & Datagrids. I have used the code below to populate a datagrid, with one field being left and editable by the user, i want them to update the field, and then want to write it back to the access data the dataset was populated from...
I am guessing from reading the few articles i have found that are of any use that this is done from databinding? Can someone explain further or point me in the right direction to a useful article relating to this, and how i go about writing it back to the access table.
Any help would be much appreciated!
Still playing about with Datasets & Datagrids. I have used the code below to populate a datagrid, with one field being left and editable by the user, i want them to update the field, and then want to write it back to the access data the dataset was populated from...
I am guessing from reading the few articles i have found that are of any use that this is done from databinding? Can someone explain further or point me in the right direction to a useful article relating to this, and how i go about writing it back to the access table.
VB.NET:
Private Sub PopulateDataGrid()
strConsignmentConnection = "SELECT * FROM PROCESSCONSIGNMENT"
dbAdapter = New OleDb.OleDbDataAdapter(strConsignmentConnection, oConsignmentStock)
dbAdapter.Fill(ConsignmentDataset, "PROCESSCONSIGNMENT")
Dim clientview As New DataView(ConsignmentDataset.Tables("PROCESSCONSIGNMENT"))
dgvProcess.DataSource = clientview
dgvProcess.Columns(0).ReadOnly = True
dgvProcess.Columns(1).ReadOnly = True
dgvProcess.Columns(2).ReadOnly = True
dgvProcess.Columns(3).ReadOnly = True
dgvProcess.Columns(4).ReadOnly = True
dgvProcess.Columns(5).ReadOnly = True
dgvProcess.Columns(6).ReadOnly = True
dgvProcess.Columns(7).ReadOnly = True
dgvProcess.Columns(8).ReadOnly = True
dgvProcess.Columns(9).ReadOnly = True
dgvProcess.Columns(10).ToolTipText = "Double Click 'Qty This Time' Column To Enter A Qty To Ship"
dgvProcess.Columns(6).HeaderText = "Qty Used To Date"
dgvProcess.Columns(5).HeaderText = "Qty Shipped"
dgvProcess.Columns(10).HeaderText = "Qty This Time"
dgvProcess.Columns(8).Visible = False
dgvProcess.Columns(9).Visible = False
dgvProcess.Sort(dgvProcess.Columns(0), System.ComponentModel.ListSortDirection.Ascending)
End Sub
Any help would be much appreciated!