ComboBox1获取datatable的一列

this.repositoryItemComboBox1.Items.Clear();
            DataTable dt = (DataTable)bindingSource_DayProp.DataSource;
            for (int i = 0; i < dt.Rows.Count; i++)
            {
                string str = dt.Rows[i][1].ToString();
                this.repositoryItemComboBox1.Items.Add(str);
            }
           

posted @ 2012-08-30 21:23  郑松涛  阅读(294)  评论(0编辑  收藏  举报