Click here to Skip to main content
12,754,090 members (30,784 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();
                    da.Fill(ds, "ProductionData");
                    dataGridView2.DataSource = ds;
                    dataGridView2.DataMember = "ProductionData";
                    e.Handled = true;
Posted 16-Feb-13 1:55am
Updated 16-Feb-13 2:00am

1 solution

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

Solution 1


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
Web02 | 2.8.170217.1 | Last Updated 16 Feb 2013
Copyright © CodeProject, 1999-2017
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