3
我正在使用C#ASP.net,并且对它有新意,并且需要在下面完成。ASP.net Gridview Itemtemplate下拉列表
在我的VS2010 Web应用程序项目中,我有webform
和Gridview
,它从表中提取数据。
在网格中,我有Commandfiled
Button(column1)和Item template with Dropdownlist
(column2)。
用例是,用户首先从3个列表项(H,L和M)中选择一个listitem
,然后选择命令按钮。
我不能够提前从选定的行弄清楚如何提取选择listitem
protected void GridView2_SelectedIndexChanged(object sender, EventArgs e)
{
GridViewRow row = GridView2.SelectedRow;
Label4.Text = "You selected " + row.Cells[4].Text + ".";
Label5.Text = "You selected this list item from dropdownlist " + ???? ;
}
感谢。
谢谢您的解决方案,并提示避免细胞指数 – user219628 2012-04-20 02:24:45