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.Controls; 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 14166
Which country has the worlds most powerful tank?
What are plan versions used for?
Why to use method – lineto in canvas?
What are loading utilities?
Show the 2 types of comments in JSP.
What is difference between hashset and hashmap?
How can you create an object in vbscript?
Name some semantic states in sapui5?
What is microsoft access database engine 2010?
if cst sales and purchase is completed and we issue c form and received c form also.but in next month both sales and purchase are return. my question is how to pass reverse entry when c forms issue/receive. how it cst return also.
What are living reservoirs?
What are the different installation modes for SAP NetWeaver installation?
Explain all the C++ concepts using examples.
Why people hate cursor?
How do you start a new line in java?