i am new to c# .
i have data in my gridview , now how to Update and Delete Data With DataGridView
below code is for geeting data in gridview its working fine :
private void findlaksajob_KeyPress(object sender, KeyPressEventArgs e)
{
if (e.KeyChar == (char)13)
{
string sql = "SELECT [Jobcard],[Planqty],[Mouldqty],[Operator],[Supervisor],[Profilename],[Process],[Date],[Remark],[Approvedby],[id],[Division],[Od] FROM [SAPProduction].[ProductionData] WHERE JobCard ='" + findlaksajob.Text.ToString() + "'";
SqlDataAdapter da = new SqlDataAdapter(sql, objConn1);
DataSet ds = new DataSet();
objConn1.Open();
da.Fill(ds, "ProductionData");
dataGridView2.DataSource = ds;
dataGridView2.DataMember = "ProductionData";
objConn1.Close();
e.Handled = true;
}
}