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 16185Post New Mind Tree ADO.NET Interview Questions
There are different classes of protections in power plants.class a,b,c are clear..is there any class d and e r there..and elaborate class b protection.
How do I upload a podcast to spotify?
What is syntax nlp terminology?
What is print format value interpolation?
When to use hadoop, hbase, hive and pig?
Explain the method to debug errors in an oracle application.
I WORKED AS A Q.C INSPECTOR IN STATIC EQUIPMENT.WHAT ARE THE QUESTIONS ARE LIKELY TO BE ASKED IN AN INTERVIEW.
Explain agile development processes?
What is the formula for spreadsheet?
why -48 volts dc used in telecommucation
What is ioc full form?
Explain filtered indexes?
What is the tag for text color in html?
How many reserved instances am I able to purchase?
When will the upgrade take place?