Click here to Skip to main content
15,916,702 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi everybody,

I bind datagridview using datatable when I want to update the datarow of datatable. I done process then try to bind datatable to datagrid only updated row will be show another rows are remved from grid. at the same time i check datatable data then there are rows availabe more than one wht is problem can anybdy explain it

code is like this:
C#
dt_row = dt.NewRow();
dt_row[3] =(txt_rate.Text).ToString();
dt_row[4] = purchase_orderNo;
dt_row[5] == Convert.ToDouble(txt_quantity.Text) * convert.ToDouble(txt_rate.Text);
dt.Rows.Add(dt_row);
dt.AcceptChanges();
GoodsGrid.DataSource = null;
GoodsGrid.DataSource = dt;
GoodsGrid.DataBind();



thanks in advance
Posted
Updated 11-Aug-10 3:33am
v2
Comments
Sandeep Mewara 11-Aug-10 9:33am    
Just the code formatting done. Was little difficult to interpret what OP was saying.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900