Click here to Skip to main content
15,895,142 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
i have 1 gridiew and records are
id name
1 vishnu
2 ram

now my requirement is when i get data in gridview, then i select a row and select value 1 from id and update to 5.. and after click on button value should be updated in database.
how to do pls help


thanks in advance


code is for fill the gridview:

C#
string sql1 = "SELECT [Jobcard],[Planqty],[Mouldqty],[Operator],[Supervisor],[Profilename],[Process],[Date],[Remark],[Approvedby],[id],[Division] FROM [SAPProduction].[ProductionData] WHERE JobCard ='" + findjobsap.Text.ToString() + "'";
                    SqlDataAdapter da = new SqlDataAdapter(sql1, objConn1);
                    DataSet ds = new DataSet();
                    //objConn1.Open();
                    da.Fill(ds, "ProductionData");
                    dataGridView2.DataSource = ds;
                    dataGridView2.DataMember = "ProductionData";
                    objConn1.Close();
                    e.Handled = true;
Posted
Updated 16-Feb-13 1:00am
v2

1 solution

 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900