1
Answer

kindly correct the below codes

Carlos kambui

Carlos kambui

8y
262
1
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)