龙盟编程博客 | 无障碍搜索 | 云盘搜索神器
快速搜索
主页 > web编程 > asp.net编程 >

ASP.NET中GridView模板列dropDownList当前行索引示例

时间:2009-12-21 11:47来源:未知 作者:admin 点击:
分享到:

ASP.NET中GridView模板列DropDownList当前行索引写法

protected void DDLAnnex_SelectedIndexChanged(object sender, EventArgs e)
{
        DropDownList drp 
= sender as DropDownList; // 触发事件的 DropDownList
        GridViewRow row = drp.NamingContainer as GridViewRow; // GridView 当前行        
        row.Style.Add(HtmlTextWriterStyle.BackgroundColor, drp.SelectedValue);
        
int CurRow = row.RowIndex;
}

精彩图集

赞助商链接