我需要將gridview與數據表進行比較,當它匹配時,我需要檢查複選框來控制匹配的確切行。所以任何人都可以給我一個意見呢?將datagridview與數據表進行比較
當前即時通訊使用foreach()和datatable.select()。 和代碼是在這裏..
foreach (GridViewRow grdrwCr /*dtrwCr1*/ in grdCr.Rows /*&dtCr1.Rows*/)
{string TxnNo = grdrwCr.Cells["TxnNo"].ToString();
string TxnDate = grdrwCr.Cells["TxnDate"].ToString();
string TxnID = grdrwCr.Cells["TxnID"].ToString();
string ChequeNo = grdrwCr.Cells["ChequeNo"].ToString();
string CrAmount = grdrwCr.Cells["lblCrAmount"].ToString();
的DataRow [] drResults = dtCrExcel.Select( 「TxnNO =」 + TxnNo +「AND(日期已經討論=「+ TxnDate +」AND Type =「+ TxnID +」AND CheckNo =「+ ChequeNo +」AND Amount =「+ CrAmount +」)「); –
更新您的問題,請不要將代碼作爲評論 – Damith