日期:2014-05-18  浏览次数:20579 次

+++++++++++++++++怎样取到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()
}
}