Click here to Skip to main content
15,212,744 members
Rate this:
Please Sign up or sign in to vote.
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

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

Solution 1

You can create a template column with a textbox and on text_change event you can place the update sql query .
   

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




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