![](https://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif)
Code
protected void gvGradeInput_RowDataBound(object sender, GridViewRowEventArgs e)
{
if (e.Row.RowType == DataControlRowType.DataRow)
{
if (e.Row.Cells[2].FindControl("txtPscj") is object)
{
((TextBox)e.Row.Cells[2].FindControl("txtPscj")).Attributes.Add("onkeydown", "if(event.keyCode==13) event.keyCode=9");
}
if(e.Row.Cells[2].FindControl("txtSycj") is object)
{
((TextBox)e.Row.Cells[2].FindControl("txtSycj")).Attributes.Add("onkeydown", "if(event.keyCode==13) event.keyCode=9");
}
if(e.Row.Cells[2].FindControl("txtJmcj") is object)
{
((TextBox)e.Row.Cells[2].FindControl("txtJmcj")).Attributes.Add("onkeydown", "if(event.keyCode==13) event.keyCode=9");
}
if(e.Row.Cells[2].FindControl("txtZcj") is object)
{
((TextBox)e.Row.Cells[2].FindControl("txtZcj")).Attributes.Add("onkeydown", "if(event.keyCode==13) event.keyCode=9");
}
}
}
posted @
2009-05-10 01:46
Blue Sky ......
阅读(
293)
评论()
编辑
收藏
举报