ListView 는 lstDocView 이것이다.


txtSectorCd.Text = lstDocView.SelectedItems[0].SubItems[0].Text;   // <- 이것이 첫번째 헤더
txtDocNo.Text = lstDocView.SelectedItems[0].SubItems[1].Text;     // <- 이것이 두번째 헤더
txtDocTitle.Text = lstDocView.SelectedItems[0].SubItems[2].Text;  // <- 이것이 세번째 헤더
txtDocCode.Text = lstDocView.SelectedItems[0].SubItems[3].Text;    // <- 이것이 네번째 헤더
txtDocWriteDate.Text = lstDocView.SelectedItems[0].SubItems[4].Text;   // <- 이것이 다섯번째 헤더

[출처] c# listView 선택한 아이템 가져오기|작성자 doghole

+ Recent posts