Hello,
Please help! I"ve created a form with three comboboxes and a datagrid. I've connect the comboboxes to the database and they all work but when i try and fill the datagrid based on the final selection from the last commbobox but it will not populate the datagridview..Help!
cmbVendor_MouseClick
Dim drv As DataRowView = cmbNatureCode.SelectedItem
Dim drv1 As DataRowView = cmbPort.SelectedItem
Dim drv2 As DataRowView = cmbVendor.SelectedItem
Dim port As String = drv1.Item("natureport").ToString
Dim ncode As String = drv.Item("naturecode").ToString
Dim vendor As String = drv2.Item("vendor").ToString
Dim da As New SqlDataAdapter("SELECT * FROM rates WHERE natureport = '" & port & "' and naturecode = '" & ncode & "' and naturecode = '" & vendor & "' ORDER BY vendor", conn)
Dim ds As New DataSet
da.Fill(ds, "rates")
ratesdataview.DataSource = ds.DefaultViewManager
conn.Close()