大家有有做一表的操作程?
比如用除,修改操作下,以便查看?
可是我在遇到一就是在
protected void GridView1_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
conStr = System.Configuration.ConfigurationSettings.AppSettings[ "sqlConnectionString "].ToString();
sqlStr = "delete from Frame where id= " + GridView1.DataKeys[e.RowIndex].Value.ToString();
sqlConn = new SqlConnection(conStr);
sqlComm = new SqlCommand(sqlStr, sqlConn);
string FC = GridView1.Rows[e.RowIndex].Cells[2].Text;
rec( "Delete ",FC); //除操作 FC除的容
}
可是什不到元格容?是空?
[解决办法]
断代码
确定你的文本不是在模板列中
[解决办法]
string FC = GridView1.Rows[e.RowIndex].Cells[2].Text;
这个对应的列是否有值 调式一下
你获取的列是否准确。