combox 绑定

 private System.Collections.ArrayList list = new System.Collections.ArrayList(); 
 System.Collections.Hashtable myHash = new System.Collections.Hashtable();
            myHash.Add("0", "未提交");
            myHash.Add("1", "提交");
            myHash.Add("2", "已完成");
            myHash.Add("-1", "作废");
            foreach (System.Collections.DictionaryEntry entry in myHash)
                list.Add(entry);
            //绑定这该死的 下拉列表 
            STATUS5.DataSource = list;
            STATUS5.DisplayMember = "Value";
            STATUS5.ValueMember = "Key"; 

posted @ 2011-01-06 13:46  DODUI  阅读(249)  评论(0编辑  收藏  举报