-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