foreach (DataGridColumn column in grdBill.Columns) { ??? }
private void btnAddBill_Click(object sender, RoutedEventArgs e) { if (txtQuantity.Text == "") return; var data = new ProductDetails() { BillNo = 12, ProductId = Convert.ToInt32(txtID.Text), ProductName = txtName.Text, ProductPrice = Convert.ToInt32(txtPrice.Text), ProductQuentity = Convert.ToInt32(txtQuantity.Text), ProductSubTotal = Convert.ToInt32(lblSubTotal.Content) }; grdBill.Items.Add(data);
ObservableCollection
private void calculate() { decimal sum1 = 0; foreach (GridViewRow i in this.gv1.Rows) { decimal e = Convert.ToDecimal(i.Cells[5].Text.ToString()); sum1 = sum1 + e; } txtSubTotal.Text = sum1.ToString(); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)