Updating gridview in vs 2016

Posted by / 27-Feb-2015 00:44

Hi, Hopefully someone can point me in the right direction with this.I have a table that is updated with status information and I would like to display this in a gridview, using Ajax to update the control when a new table insert has been completed. Find Control("Lamp_pro5"); Text Box txt3 = (Text Box)Grid View2. Open(); Sql Command upd Cmd = new Sql Command(upd Stmt, con); upd Cmd. Find Control("AC_Profile5"); string upd Stmt = "UPDATE Quantity set [email protected]_pro4, [email protected]_pro5, [email protected]_Profile5 where [email protected] Name"; con. Data Bind(); } string connetion String = "YOUR_CONSTR" ; string upd Stmt = "UPDATE Quantity set [email protected]_pro4, [email protected]_pro5, [email protected]_profile5 " + "where [email protected] Name"; using (Sql Connection cnn = new Sql Connection(connetion String)) { cnn. Data Bind(); } protected void Grid View2_Row Updating(object sender, Grid View Update Event Args e) { //Grid View Row row = (Grid View Row)Grid View2.

Thanks, Jay Hi JRhys, here is my suggestion for your problems,mainly about the direction 1 Create an web application, Add an page 2 Add scriptmanage in your page in the form tag like this: protected void Row Editing(object sender, Grid View Edit Event Args e) { Grid View1. Data Bind(); } protected void Row Updating(object sender, Grid View Update Event Args e) { } protected void Row Canceling Edit(object sender, Grid View Cancel Edit Event Args e) { Grid View1. Data Source = Get Data From Data Base(); Grid View1.Data Bind(); } 7 Run the applicatin,edit the gridview ,you will see the result. Open(); Sql Command cmd = new Sql Command("UPDATE Quantity set Lamp_pro4='" + txt1. Open(); Sql Command upd Cmd = new Sql Command(upd Stmt , cnn); // use sql Parameters to prevent sql injection! As far as i can tell I should have my aspx Grid View control configured and nested inside an ajax update Panel, then databound to a datatable/dataset pertaining to to the database table in question, and possibly then using the trigger tags?

updating gridview in vs 2016-13updating gridview in vs 2016-34updating gridview in vs 2016-48

Looking for some clarification on how i should be going about this, and if the above is on the right lines? Data Source = Get Data From Data Base(); Grid View1.