---
title: "ListView CheckedItems find item by name"  
description: "ListView CheckedItems find item by name"  
author: "Jayden Bell"  
published: 2013-09-04  
updated: 2013-09-04  
canonical: https://www.mindstick.com/forum/1451/listview-checkeditems-find-item-by-name  
category: "c#"  
tags: ["c#"]  
reading_time: 1 minute  

---

# ListView CheckedItems find item by name

I need to [check if](https://www.mindstick.com/forum/12878/how-to-check-if-an-asp-dot-net-file-upload-control-has-a-file-in-jquery) an [item](https://www.mindstick.com/forum/156564/remove-item-in-an-array-in-javascript) with a particular [name](https://yourviews.mindstick.com/view/87450/how-to-generate-a-brand-name-using-linkedin-comprehensive-guide) [exists](https://www.mindstick.com/forum/158947/how-do-you-use-the-exists-operator-to-check-for-the-existence-of-records-in-a-subquery) in the CheckedItems [collection](https://www.mindstick.com/articles/1718/collections-in-java) of a ListView.

So far I've tried:

ListViewItem item = new ListViewItem(itemName);

if (listView1.CheckedItems.IndexOf(item) >= 0)

return [true](https://yourviews.mindstick.com/view/81326/boycott-chinese-products-dream-will-come-true);

and

ListViewItem item = new ListViewItem(itemName);

if (listView1.CheckedItems.Contains(item))

return true;

Neither of those worked. Is there a way to do this without looping through CheckedItems and checking them one by one?

## Replies

### Reply by Sumit Kesarwani

Hi Jayden,

Get rid of newing up a ListViewItem and do this instead:

```
ListViewItem itemYouAreLookingFor = listView1.FindItemWithText("NameToLookFor");// Did we find a match?if (itemYouAreLookingFor != null){    // Yes, so find out if the item is checked or not?    if(itemYouAreLookingFor.Checked)    {        // Yes, it is found and check so do something with item here    }}
```


---

Original Source: https://www.mindstick.com/forum/1451/listview-checkeditems-find-item-by-name

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
