Click here to Skip to main content
12,255,451 members (38,546 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C#
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:

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 16-Feb-13 0:55am
Edited 16-Feb-13 1:00am
uspatel30.2K
v2

1 solution

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web01 | 2.8.160426.1 | Last Updated 16 Feb 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100