lamont Posted March 30, 2015 Share Posted March 30, 2015 (edited) arkadaşlar ListView Arama nasıl yapabilirz aşagıdaki şekilde arama yapmıyor private void button2_Click(object sender, EventArgs e) { for (int i = 0 ; i < listView1.Items . Count ; i++) { if (listView1.Items[i].SubItems[1].Text==textBox5.Text) { listView1.SelectedItems.Count.ToString(); } } } } } Edited March 30, 2015 by lamont Quote Link to comment Share on other sites More sharing options...
Editor pairs Posted March 30, 2015 Editor Share Posted March 30, 2015 http://www.dreamincode.net/forums/topic/124976-search-for-items-in-listview/ Biraz google ı kullanalım. Quote Link to comment Share on other sites More sharing options...
lamont Posted March 30, 2015 Author Share Posted March 30, 2015 (edited) Çözdüm Arama işini Kodları Paylaşıyorum private void button2_Click(object sender, EventArgs e) { string ara = textBox5.Text; if (!string.IsNullOrEmpty(ara)) { foreach (ListViewItem arama in listView1.Items) { string bul = arama.Text.ToString(); if (bul == ara) { arama.BackColor = Color.Yellow ; arama.Checked = true; ara = null; break; } else { continue; } } } } Edited March 30, 2015 by lamont Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.