DataTable dt = blord.getitembyitem_id(Convert.ToInt32(lblitem_id.Text)); if (dt.Rows.Count > 0) { if (dataGridView1.Rows[i].Cells[0].Value.ToString() == "") { dataGridView1.Rows.Add(); dataGridView1.Rows[i].Cells[0].Value = dt.Rows[0]["item_name"].ToString(); dataGridView1.Rows[i].Cells[1].Value = quantity; dataGridView1.Rows[i].Cells[2].Value = dt.Rows[0]["item_price"].ToString(); i++; } else { dataGridView1.Rows[i].Cells[1].Value = dataGridView1.Rows[i].Cells[1].Value + 1.ToString(); } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)