第七色在线视频,2021少妇久久久久久久久久,亚洲欧洲精品成人久久av18,亚洲国产精品特色大片观看完整版,孙宇晨将参加特朗普的晚宴

為了賬號安全,請及時綁定郵箱和手機(jī)立即綁定
已解決430363個問題,去搜搜看,總會有你想問的

在winforms中不顯示ListView的子項

在winforms中不顯示ListView的子項

C#
眼眸繁星 2021-08-07 17:35:14
我正在 Visual Studio 2017 中創(chuàng)建一個 winforms 應(yīng)用程序,我正在使用 List<KeyValuePair<string, string>>數(shù)據(jù)示例如下: List<KeyValuePair<ABC, 123>> List<KeyValuePair<ABC, 456>> List<KeyValuePair<ABC, 789>> List<KeyValuePair<DEF, 123>> List<KeyValuePair<DEF, 233>>我嘗試在 ListView 中顯示它,在那里我想要這樣的東西:美國廣播公司123456789防御工事123233其中 ABC 和 DEF 只能選擇。我嘗試編寫代碼來執(zhí)行此操作,但不幸的是它只顯示 ABC 和 DEF 而沒有子項。我寫的代碼是:   workOrderClusters = GetItac.FilterWorkOrderClusters();        // GetItac.FilterWorkOrderClusters() is a          List<KeyValuePair<string,string>>        string current; string previous,        foreach (var workOrderCluster in workOrderClusters)        {            current = workOrderCluster.Key;            if (current != previous)            {                var listViewItem = new ListViewItem(workOrderCluster.Key);                foreach (var cluster in workOrderClusters)                {                    if (cluster.Key == current)                    {                        listViewItem.SubItems.Add(cluster.Value);                    }                }            }            previous = current;            listView1.Items.Add(listViewItem);我的問題是,無論如何都可以按預(yù)期顯示 ListView 嗎?
查看完整描述

1 回答

  • 1 回答
  • 0 關(guān)注
  • 235 瀏覽

添加回答

舉報

0/150
提交
取消
微信客服

購課補(bǔ)貼
聯(lián)系客服咨詢優(yōu)惠詳情

幫助反饋 APP下載

慕課網(wǎng)APP
您的移動學(xué)習(xí)伙伴

公眾號

掃描二維碼
關(guān)注慕課網(wǎng)微信公眾號