当前位置: 代码迷 >> ASP.NET >> +++++++++++++++++怎的取到GridView的Header行的值
  详细解决方案

+++++++++++++++++怎的取到GridView的Header行的值

热度:5924   发布时间:2013-02-25 00:00:00.0
+++++++++++++++++怎样取到GridView的Header行的值?
一个网页有两个GridView

tGridView,
cGridView

我在js里用
var   val=e.srcElement.parentElement.cells[0].innerText;
document.getElementById( "lbDate ").innerText=val;
取到了cGridView的值(e.srcElement.parentElement.cells[0].innerText),我现在想在这里取到tGridView的header行的值,请问怎样处理?

谢谢!


------解决方案--------------------------------------------------------
protected void GridView1_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Cells[0].Text.ToString().Trim()
}
}
  相关解决方案