Click here to Skip to main content
15,885,767 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have a list(table) in gridview two columns c# and sqlserver 2005 express
for update list with others values
(table)
id value
1 0
2 0
3 0
4 0
5 0

DataTable mydt3;DataSet myds3;SqlDataAdapter myda3;SqlCommand mycmd3;

string connectionString = Connexion.GetConnectionString();

SqlConnection conn = new SqlConnection(connectionString);

mycmd3 = new SqlCommand(" SELECT id,value from table ", conn);
conn.Open();
myda3 = new SqlDataAdapter(mycmd3);
mycmb3 = new SqlCommandBuilder(myda3);
myds3 = new DataSet();
myda3.Fill(myds3, "Stores");
mydt3 = myds3.Tables["Stores"];
drvMuestras.DataSource = myds3.Tables["Stores"];
conn.Close();

i need, what at update firt value in gridview,
row 1 value 0, i replece the value 0 whith value 5
for example, i need you updated the table

not use a command buttom,
only whith key enter or tab in the gridview

myda3.Update(mydt3);

or other solution

thank you
Posted

1 solution

You can create a template column with a textbox and on text_change event you can place the update sql query .
 
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