Rowupdating findcontrol dropdownlist


15-Jan-2015 03:52

Edit Index = -1; bind(); } protected void Grid View1_Row Updating(object sender, Grid View Update Event Args e) { Grid View Row row = (Grid View Row)Grid View1. Find Control("textbox1"); Text Box textmarks = (Text Box)row.

Close(); bind(); } protected void Grid View1_Page Index Changing(object sender, Grid View Page Event Args e) { Grid View1. New Page Index; bind(); } }hi, I'm having a problem with updating the data source from the Grid View I'm following what you did in the article, but in the Grid View1_Row Updating handler when I execute update statement textname. i am getting oledbexception was unhandled by user code No value given for one or more required parameters. for me Grid View Row row = (Grid View Row)Grid View1. Find Control("textbox5"); Text Box textcityname = (Text Box)row. Open(); Ole Db Command cmd = new Ole Db Command("update Employee Details set firstname=" + textfirstname. Find Control("textbox4"); Text Box textaddress= (Text Box)row. To String(Application["con"]); Ole Db Connection my Connection = new Ole Db Connection(conn); my Connection. Open(); Ole Db Data Adapter da = new Ole Db Data Adapter("select * from Employee Details", my Connection); Response. Find Control("textbox3"); Text Box textdateofbirth = (Text Box)row. Is Post Back) { bind(); } } public void bind() { my Connection. Find Control("textbox5"); Text Box textcityname = (Text Box)row. Open(); Ole Db Command cmd = new Ole Db Command("update Employee Details set firstname=" + textfirstname. protected void Grid View1_Row Updating(object sender, System. Find Control("textbox2"); Text Box textgender = (Text Box)row. Close(); Employee_display(); }Hi Hussain, Thanks for your response. I am sending the code:namespace Employee_details{ public partial class Emp Reg Details : System. To String(Application["con"]); my Connection = new Ole Db Connection(conn); if (! Find Control("textbox4"); Text Box textaddress = (Text Box)row. To String(Application["con"]); Ole Db Connection my Connection = new Ole Db Connection(conn); my Connection. Text + "", my Connection); // Sql Command cmd = new Sql Command("update emp set marks=" + textmarks.

Close(); } protected void Grid View1_Selected Index Changing(object sender, Grid View Select Event Args e) { } protected void Grid View1_Row Command(object sender, Grid View Command Event Args e) { } protected void Grid View1_Row Deleting(object sender, Grid View Delete Event Args e) { Grid View Row row = (Grid View Row)Grid View1. Open(); Sql Command cmd = new Sql Command("delete emp where rowid=" + lbldelete ID. Text for example gets me the old values not the changed data in the Text Box. Is there an event that fires before the Row Updating so it binds the old data again with the Text Boxes in the Edit mode?