private void setNormalFinanciaData()
        { 
            DataTable dtList 
= new DataTable();
            dtList.Columns.Add(
new DataColumn("text"typeof(string)));
            dtList.Columns.Add(
new DataColumn("value"typeof(string)));
            dtList.Rows.Add(dtList.NewRow());
            dtList.Rows.Add(dtList.NewRow());
            dtList.Rows.Add(dtList.NewRow());
            dtList.Rows.Add(dtList.NewRow());
            dtList.Rows[
0][0= "aaa";
            dtList.Rows[
0][1= "001";
            dtList.Rows[
1][0= "bbb";
            dtList.Rows[
1][1= "002";
            dtList.Rows[
2][0= "ccc";
            dtList.Rows[
2][1= "003";
            dtList.Rows[
3][0= "ddd";
            dtList.Rows[
3][1= "004";

            cmbFinancial.DataSource 
= dtList;
            cmbFinancial.DisplayMember 
= "text";
            cmbFinancial.ValueMember 
= "value";
        }





posted on 2010-08-24 09:53 Ying-er 阅读(201) 评论(0)  编辑  收藏 所属分类: .Net

只有注册用户登录后才能发表评论。


网站导航: