Users Pricing

forum

Home Forums How to select row from winforms listview in C# – MindStick

How to select row from winforms listview in C#

Anonymous User 3343 17 Jul 2013
Hi mindstick!

I have listview which is populated with list of data. Now I want to select desired row and on click button to recognize that item to delete from a collection.

Question is how to recognize selected row from the listview?

private void buttonDelete_Click(object sender, EventArgs e)

{

    //selected data is of custom type SelectedData

    var selected = (SelectedData)....?

}

Thanks in Advanced!


1 Answers

Markdown for AI

A clean, structured version of this page for AI assistants and LLMs.

Open .md