zoukankan      html  css  js  c++  java
  • DropDownList绑定枚举类型值与绑定数据列名称


    this.DropDownList.DataSource = Enum.GetNames(typeof(MyEnum));

    this.DropDownList.DataBing();

        //dropdownList绑定数据列名

                DataSet ds = GetDataSource();
                for (int i = 0; i < ds.Tables[0].Columns.Count; i++)
                {
                    this.ddlXValue.Items.Add(new ListItem(ds.Tables[0].Columns[i].ColumnName.ToString(),i.ToString()));
                    this.ddlYValue.Items.Add(new ListItem(ds.Tables[0].Columns[i].ColumnName.ToString(), i.ToString()));
                }

  • 相关阅读:
    清理计算机硬盘
    DIY-组装
    go函数类型的使用
    go同步互斥锁
    Go读写文件
    go mod
    go html
    channel
    arp和rarp协议
    自己实现的反射
  • 原文地址:https://www.cnblogs.com/chenqingwei/p/1717373.html
Copyright © 2011-2022 走看看