---
title: "How to select row from winforms listview in C#"  
description: "How to select row from winforms listview in C#"  
author: "Anonymous User"  
published: 2013-07-17  
updated: 2013-07-17  
canonical: https://www.mindstick.com/forum/1299/how-to-select-row-from-winforms-listview-in-c-sharp  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# How to select row from winforms listview in C#

Hi [mindstick](https://yourviews.mindstick.com/view/84668/how-mindstick-is-used-for-marketing-purposes)!

I have [listview](https://www.mindstick.com/articles/12744/listview-in-android) which is populated with list of data. Now I want to [select](https://www.mindstick.com/forum/160534/orderby-then-select-vs-select-then-orderby-performance) desired row and on [click button](https://www.mindstick.com/forum/34274/how-to-pass-combobox-value-from-windows-form-edirrow-to-windows-form-form1-where-click-button) to recognize that item to [delete](https://www.mindstick.com/forum/33620/how-to-delete-record-from-list-in-mvc-using-ajax) from a collection.

[Question](https://www.mindstick.com/blog/23175/how-to-solve-neet-question-paper-in-less-time) is how to recognize selected row from the listview?

[private](https://www.mindstick.com/blog/11097/java-access-modifiers-the-public-and-the-private-modifiers) void buttonDelete_Click(object sender, EventArgs e)

{

//selected data is of [custom](https://www.mindstick.com/blog/12298/use-custom-writing-services-to-get-through-the-finals) type SelectedData

var selected = (SelectedData)....?

}

Thanks in [Advanced](https://www.mindstick.com/articles/12993/5-advanced-features-for-your-odoo-ecommerce-theme)!

## Replies

### Reply by shreesh chandra shukla

Solution!

This should works

```
  private void
buttonDelete_Click(object sender, EventArgs e)    {        //selected
data is of custom type MyData        var selected =
yourListView.SelectedItems.First();    }
```


---

Original Source: https://www.mindstick.com/forum/1299/how-to-select-row-from-winforms-listview-in-c-sharp

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
