主题:怎么在datagrid中的下拉列表dropdownlist中绑定数据?
大雨.NET
[专家分:0] 发布于 2007-04-09 13:39:00
怎么在datagrid中的下拉列表dropdownlist中绑定数据?
回复列表 (共1个回复)
沙发
喆喆 [专家分:90] 发布于 2007-04-10 14:32:00
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">
我来回复