我有一个网格控件设置与主 - 细节关系,但我想知道如何访问详细视图记录或行来执行编辑或更新信息。我试过这个但是它没有用,它返回0到表单:
void AddPayment_Click(object sender, EventArgs e) {
Paymentfrm payent = new Paymentfrm(Utils.Formtype.add, 0);
payent.PaymentEvent += new EventHandler(RefreshingGrid);
payent.PayentlabelsEvent += new EventHandler(RefresHlabels);
gridView1.ViewCaption = " Lessee Payment ";
CardView card = new CardView(DgPaymentYW);
DgPaymentYW.LevelTree.Nodes.Add("LesseePayments", card);
card.ViewCaption = " Lessee Payments";
GetPayment.TotalPrice = Convert.ToDecimal(card.GetFocusedRowCellValue("TotalPrice"));
payent.ShowDialog();
}