Hi to all,
I have a problem in updating the datagrid.
The scenerio is: I am having a datagrid on my page.I am basically working on shopping cart.Whenever user selects any the product it should be displayed in the datagrid(ie my cart).Suppose the user continues the shopping and he again selects one of the product.Then it should be added below the first row in the datagrid.
But I am not getting this result.Whenever I add another item in my cart ,it will replace the previous one.
I have tried it as:
{
get_data();
Session[
}
dt = (
dt =
dt.Columns.Add(
pro_id = Request.QueryString[
quanti =
cmd.Connection = con;
cmd.CommandText =
cmd.Parameters.Add(
cmd.Connection.Open();
desc = (rdr[
id = (rdr[
unitprice =
cost = unitprice * quanti;
arRole1.Add(rdr[
cmd.Connection.Close();
myrow[
dt.Rows.Add(myrow);
dt.AcceptChanges();
DataGrid2.DataSource = dt;
DataGrid2.DataBind();
Please give me some idea where I am lacking.
Thanks in advance!!