انا كتبتب الكود ده لعمل أبديت للجريد
protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e)
{
GridViewRow row = GridView1.Rows[e.RowIndex];
string s1 = row.Cells[5].Text;
string s = row.Cells[4].Text;
//Remarks , CreatedBy, CreationDate
SqlConnection cn = new SqlConnection();
cn.ConnectionString = ConfigurationManager.ConnectionStrings["ACCITConnectionString"].ConnectionString;
string sql = "update IdentityType set IdentityType_Name='"+ row.Cells[5].Text +"' , Remarks '"+ row.Cells[6].Text;
SqlCommand cmd = new SqlCommand(sql , cn);
cn.Open();
cmd.ExecuteNonQuery();
GridView1.EditIndex = -1;
//Display Data in DataGride
GridView1.DataBind();
cn.Close();
}يعطي لي مشكلة بجمله الابدييت
string sql = "update IdentityType set IdentityType_Name='"+ row.Cells[5].Text +"' , Remarks '"+ row.Cells[6].Text;
أرجو المساعدة ولكم جزيل الشكر