Vinayak,
the execution of your code is one direction i.e from Screen to database. If you want a two way behavior you must attach a data source to your datagridview and use that data source ( data source can be a DataTable,DataSet or DataAdaptor) to execute the backend operation thats pretty easy rather messing with the grid itself.
check the following link and try that
http://forums.devshed.com/net-development-87/update-table-in-database-through-datagridview-in-winform-350445.html[
^]
SqlDataAdapter da=new SqlDataAdapter("select * from product",strcon);
SqlCommandBuilder cb=new SqlCommandBuilder(da);
DataSet ds = new DataSet();
da.Fill(ds);
dataGridView1.DataSource=ds.Tables[0];
//now u can save changes to back end with
da.Update(ds);