Quantcast
Channel: Windows Forms General forum
Viewing all articles
Browse latest Browse all 12583

c# compare listview

$
0
0

Dear Exprt,

I am trying to compare listview item base on checkbox selection, i have tried with below code does not help me canu plz assist

 if (listView2.CheckedItems.Count > 0)
            {
                string text = listView2.CheckedItems[0].Text;
                for (int i = 0; i < listView1.CheckedItems.Count; i++)
                {
                    if (listView1.CheckedItems[i].Text.Equals(text))
                    {
                        listView1.CheckedItems[i].Checked = true;
                        return;
                    }
                }
            } 



Support@Mytechnet.me


Viewing all articles
Browse latest Browse all 12583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>