我對(duì)C#中的Listview有一些疑問,我的listview包含2列,如下所示:colDATA1 colDATA2 Value1 Amount1 Value2 Amount2 Value3 Amount3 Value4 Amount4我想做的是Amount5在Listview中搜索如果不存在,請(qǐng)執(zhí)行一些操作。如果存在,則返回Value5我正在嘗試搜索和使用像這樣的代碼:If (Listview1.items.containskey("Amount5")){}else{MessageBox.show("Not Found")}or if exist then return the value5 *I have no idea how to do.我在谷歌搜索此,但大多數(shù)都只有1列,當(dāng)我使用代碼時(shí),代碼將無法工作。My question is : 1. How can I get Value5 if Amount5 exist.謝謝你。添加項(xiàng)目的代碼First Set listView1 Property "View : Details" Then Using this codethis.Listview1.Items.Add(new ListViewItem(new string[] { Value1, Amount1 }));
- 1 回答
- 0 關(guān)注
- 174 瀏覽
添加回答
舉報(bào)
0/150
提交
取消