详情请查看此链接http://www.lob.cn/jq/skill/1505.shtml
关键是以下的代码不会用datagridview转换:
Private Sub DataGrid1_CurrentCellChanged(By Val sender As Object, By Val e As System.EventArgs) Handles DataGrid1.CurrentCellChanged
 Dim titled As String = DataGrid1.Item(DataGrid1.CurrentCell.RowNumber, 0).To String
 ’判断用户在主表中选择了哪一行,取出它的第0列(在本例中即为title_id列)
 Dim sql As String = "select * from sales where title_id=’" & titled & "’"
 ’SQL命令字符串,选择与主表中相同title_id值的从表数据
 Dim cn As New SqlConnection(Connection String)
 cn.Open()
 Dim ds As New Dataset
 Dim da As New SqlDataAdapter(sql, cn)
 Dim Sales Table As New Data Table("Sales")
 ds.Tables.Add(Sales Table)
 da.Fill(Sales Table)
 ’用选择的从表数据填充,更新
 da.Dispose()
 cn.Close()
 DataGrid2.DataSource = Sales Table
End Sub
End Class