Why isn't 'SelectedIndex' defined on this ListView?

前端 未结 2 353
遥遥无期
遥遥无期 2020-12-21 11:34

I have created a ListView called listUsers, but for some reason SelectedIndex isn\'t defined.

2条回答
  •  有刺的猬
    2020-12-21 12:13

    There is no selected index property on ListView in winforms. To get the selected index you can use

    listView1.SelectedIndices[0];
    

提交回复
热议问题