How To Update A Column In A DataGrid Using C#.NET? I am getting InvalidCastException as (Specified cast is not valid) while updating 2nd column in a datagrid? Id,firstname,lastname are the three columns of my datagrid respectively. I wanted to edit the second column(lastname) and update it. I did the following code in DataGrid's updatecommand(),but failed to update ! Int varid=(int)DataGrid1.DataKeys[e.Item.ItemIndex]; TextBox lnm=(TextBox)e.Item.Cells[2].Controls[0]; string str=lnm.Text ; SqlCommand cmd=new SqlCommand("update customer set lastname='" + str + "' where id=" + varid + "",con); cmd.ExecuteNonQuery(); DataGrid1.EditItemIndex=- 1; DataGrid1.DataBind();
2 16339Post New Mind Tree ADO.NET Interview Questions
Can anybody help me in writing test cases for a scenario? need help at the earliest. will send you the requirement doc to your email id. thanks raj
hello sir..iam keen to sit for iocl interview..please forward sample iocl questions to my id: kunal_kv06@yahoo.co.in
How is git instaweb used?
please send me andhra bank clerk xam model papers
What are the steps in creating a database?
What do you know about our organization
How do you see your career at ATT?
sas implementing companies in pune implementing clinical projects if anyone knows plz send ans immediately
Define Environment Variable in UFT and its uses?
How do I remove duplicates in two columns?
Hi I need real time senarios and how to explain project in the interview pls let me know my email id m.n.prathyusha@gmail.com.Please help me out with this pls pls pls muthireddi@gmail.com
Hi Can anybody send me the interview questions for sap abap crm. and also any study material for the same.my e-mail is is swarareddy30@gmail.com. Thanks Swara
What are your views on demonetization?
Hai Frds i want to join in testing tools course , plee tel me which was the Best institute, plsss reply me, i am waiting for ur reply....
what salary you expect???