I have 2 datagrid, 1 with details of Category and the other with the products user selected from the other datagrid, what Im saying is I have a select command on my 1st datagrid so when I select something from my 1st datagrid it should be added to the 2nd datagrid and that is workin but the problem is everytime I select somethin from the 1st datagrid adding to the 2nd datagrid it overwrites the existing record on the 2nd datagrid instead of adding on top of... can anyone help me please here the code to add what is from the 1st grid to the second one
imgItems.ImageUrl = "Pictures/" + dgItems.SelectedItem.Cells[2].Text;
string strDetails = "sdp_ViewProducts";
//CommandType.StoredProcedure;
DataSet dsDetails = new DataSet();
SqlDataAdapter daDetails = new SqlDataAdapter(strDetails, conn);
daDetails.SelectCommand.CommandText = "Select ProductID, ProductName, UnitPrice, UnitsInStock, UnitsOnOrder from dbo.Products where ProductID = " +
dgItems.SelectedItem.Cells[1].Text;
daDetails.Fill(dsDetails, "Products");
dgDetails.DataSource = dsDetails;
dgDetails.DataMember = "Products";
dgDetails.DataKeyField = "ProductID";
dgDetails.DataBind();
dgDetails.Visible = true;
Thanx in advance