Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
ユーザーがデータグリッドを右クリックしたときに、データグリッドのデータグリッドを取得したいですか?
選択した行を取得するには、SelectionChangeイベントを追加する必要があります
private void dataGrid1_SelectionChanged(object sender, SelectionChangedEventArgs e) { var rowview = dataGrid1.SelectedItem ; if (rowview != null) { //your code } }