Carlos kambui

Carlos kambui

  • NA
  • 499
  • 125.8k

kindly correct the below codes

Jul 28 2016 11:58 AM
i have two forms one with datagrid containing receipts and other one with receipt details, i want when i click on receipt_id the other form with datagrid to show items in that receipt_id
receiptdetails rctd = new receiptdetails(); // calling form with datagrid to show receipt details
int receiptid;
int i;
i = dgvdata.SelectedCells[0].RowIndex;//dgvdata datagrid with receipts
receiptid = Convert.ToInt32(dgvdata.Rows[i].Cells[0].Value.ToString());
recdetaits = svcclient.Getposreceiptdetailstran(receiptid);
rctd.dgvdata2.DataSource = recdetaits;// want dgvdata2 to show receipt details
rctd.dgvdata2.Refresh();
rctd.ShowDialog();
 

Answers (1)