0
我得到了這個問題,如何確定datagridview中的下一行是否等於負數,然後當前行將返回一個備註。如何確定datagridview中的下一行是否等於負整數?
例如;
Remarks Reference
A 1
A 2
B 3
-4
如果下一行是一個正數,發言將是A.如果下一行是負值,言論將返回B.
我掙扎在這一部分。
下面是代碼:
For Each r As DataGridViewRow In dgvSTSub.Rows
Bal = Bal + r.Cells(3).Value - r.Cells(1).Value
r.Cells(3).Value = Bal
If Bal > Bal + r.Cells(3).Value Then
r.Cells(2).Value = r.Cells(1).Value
End If
Next
如上圖所示這是不實際的DataGridView但是這正是我希望發生的。
任何幫助/建議表示讚賞。
請出示您的鬥爭這部分 – Plutonix
對不起,我無法包含我的代碼。 – Diaval
我編輯了我的帖子..請看看它。 – Diaval