Private Sub BtnEdit_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles BtnEdit.Click
'variables
'make use of oledbcommandbuilder
Dim autogen As New OleDbCommandBuilder(DACD)
Dim datatable As DataTable
Dim row As DataRow
Dim strExpr As String
DataConnection.Open()
datatable = DSListboxes.Tables("tblCD")
'here I want to select the current CDID
strExpr = "CDID = " & Me.BindingContext(DSlistboxes, "tblCD").Position
'error message : value of 1-dimensional array of system.data.datarow cannot be converted to system.data.datarowview
row = datatable.Select(strExpr)
'Populate the datarow with values
row("ProgramGroup") = Me.TextBoxProgramGroup.Text
row("SubgroupID") = Me.ListBox3.SelectedValue
row("CompanyID") = Me.ListBoxCompany.SelectedValue
DACD.Update(DSlistboxes, "tblCD")
'close dataconnection
DataConnection.Close()
End Sub