にdatatable表示されているがありDataGridViewます。
ユーザーにで値を選択してもらい、datagridviewその値をフィルターとして使用して、で別の値を検索しますdatatable。
だから次のようなもの:
SELECT col2 from DataTable2 where col1=
(value in selected cell of the DataGridView)
編集
OK、正しい質問をしているのかわからないので、いくつかの情報を追加しました。
私はdatagridview以下のようなツールチップを持っています:
Sub dataGridView1_CellFormatting(ByVal sender As Object, _
ByVal e As DataGridViewCellFormattingEventArgs) _
Handles DataGridView1.CellFormatting
If e.ColumnIndex = Me.DataGridView1.Columns("Last Stop").Index _
AndAlso (e.Value IsNot Nothing) Then
With Me.DataGridView1.Rows(e.RowIndex).Cells(e.ColumnIndex)
.ToolTipText = '(THIS IS WHERE I'M STUCK)
End With
End If
End Sub
私が上で立ち往生しているビットは、DataTableで名前を検索するLast Stopために値を使用したい場所です-e.Value
ToolTipSN.Tables( "DT_ToolTip")