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 16044Post New Mind Tree ADO.NET Interview Questions
What are shares? What are nominal value/ free value of shares?
HOw u have Implement credit management for your client in ur current project >Tell how it starts and it ends.Please provide some real time examples.
how can you load a vsam data set with records ?
What is executor in spark?
From past few months I am getting lagging pf even though sufficient capacitors used in circuit. Where is the problem pls answer
What technique uses angular 2 for two way binding?
Define what are rules to follow in WordPress plugin development?
What is a socket api?
What is the apache struts vulnerability?
How can you relate the goals you have for yourself to the goals of NetApp?
Why do you want to work for BPO company
How does a virtual private network (vpn) work?
candidate key is subset of super key but not vice-verse explain
How to find out what is the default collation in a database?
HI guys i am reently learning sap fico how is the course and i want to know how the sap fico in real time implementation guidelines can any send me how