-2
我有一个RowDataBound
事件如下。JavaScript从网格检索值
protected void GridLedger_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
e.Row.Attributes.Add("onMouseDown", "var str = document.getElementById('" + e.Row.ClientID + "').cells[0].innerText; document.getElementById('<%=TextBox1.ClientID%>').value = str;");
}
}
当这个事件触发时,我收到以下错误:
object element not found or not an object
为什么会出现这个错误?
海。请花时间写出适当的句子k? – 2009-12-07 06:56:09