后台代码
protected void BindType()
{
for (int i = 0; i < gvMessage.Rows.Count; i++)
{
DropDownList drplist = (DropDownList)gvMessage.Rows[i].Cells[1].FindControl("drpType");
drplist.DataTextField = "DataLabel";
drplist.DataValueField = "Code";
drplist.DataSource = 查到的数据源;
drplist.DataBind();
drplist.Items.Insert(0, new ListItem("请选择", ""));
}
}
阅读(460) | 评论(0) | 转发(0) |