这段代码放在DropDownList数据绑定下面:
DropDownListId.Items.Insert(0, new ListItem("请选择", ""));
ListItem[] NewList = new ListItem[1];
NewList[0] = new ListItem("请选择", "");
YourDropDownList.Items.AddRange(NewList);
YourDropDownList 是你的DropDownList
Table = kdbll.SelectKnowlegecode(strIPCode);
Table.Rows.InsertAt(Table.NewRow(), 0);
Table.Rows[0][0] = "";
Table.Rows[0][1] = "";
Table.Rows[0][2] = "请选择";
Table.Rows[0][3] = "0";
this.comKnowledge5.DataSource = Table;
this.comKnowledge5.DisplayMember = "Name";
this.comKnowledge5.ValueMember = "ID";