Actually my code looks like this....
private void DataGrid1_UpdateCommand(object source,
System.Web.UI.WebControls.DataGridCommandEventArgs e)
{
DataGrid1.Columns[5].Visible=true;
DataGrid1.Columns[6].Visible=true;
TextBox t1=new TextBox();
TextBox t6=new TextBox();
TextBox t7=new TextBox();
t1.Text=((TextBox)e.Item.FindControl("TextBox10")) .Text
t2.Text=((TextBox)e.Item.Cells[2].FindControl("TextBox8")).Text; t3.Text=((TextBox)e.Item.Cells[3].FindControl("TextBox9")).Text;
SqlConnection con=DataAccessor.CreateConnection();
SqlCommand cmd=new SqlCommand();
cmd.Connection=con;
cmd.CommandType=CommandType.Text;
cmd.CommandText=@"update tblPQOrder set
ProoductID="+t1.Text+","+"Quantity="+t2.Text+","+" UnitCost="+t3.Text+"where
ItemID="+DataGrid1.DataKeys[e.Item.ItemIndex];
cmd.ExecuteReader();
DataAccessor.CloseConnection(con);
cmd.Dispose();
Rebind();
}
the new value is not entering in to the code when i debug....Is there any
error in the SQL Update Statment???
--
Jijo kuruvila
trivandrum,Kerala,India