So, I have the ms_trans DataGridView...
I'm trying to solve saving problem by this:
- The for loop doesn't give back the last value
So, when I click save, the button insert a "" string to all cells, but every time I click this will added.
int Last = ms_trans.Rows.Count;
if (ms_trans.Rows[Last - 1].Cells[0].Value.ToString() == "<append>")
This If statement has NullReferenceException. Why?
First, I added with Last-1, it worked (Only the Last gave OutOfRangeExeption). Why isn't working is this with getting the value?