回 帖 发 新 帖 刷新版面

主题:怎么在datagrid中的下拉列表dropdownlist中绑定数据?

怎么在datagrid中的下拉列表dropdownlist中绑定数据?   

回复列表 (共1个回复)

沙发

protected void OnDropDownList1SelectIndexChanged(object sender, EventArgs args)
    {
        DropDownList dropDownList = sender as DropDownList;
        Label currentLabel = (dropDownList.Parent.Parent as TableRow).Cells[1].FindControl("Label1") as Label;
        currentLabel.Text = dropDownList.SelectedItem.Text;
在后台asp这样改写:
<aspropDownList ID="DropDownList1" runat="server" OnSelectedIndexChanged="OnDropDownList1SelectIndexChanged">

我来回复

您尚未登录,请登录后再回复。点此登录或注册