Spark Sine

Spark Sine

  • NA
  • 1
  • 946

DataViewGrid Entry Disappears (C#)

Feb 27 2015 2:46 PM
When I add an item to the datagridview (from another form), it shows up just fine. But when I try to add another item to the datagridview, only the new item appears, and the previous one gets thrown out, it appears.
Note that I'm using .Hide, and .Show, to move between two forms (add_form and main_form). I've tried using .ShowDialog to see if it would fix the problem, but instead I get multiple instances of the same window open after moving back and forth between forms.
How can I fix this problem?

(From the add page, the last bits of code are:

//goes to main form where the DGV is

invmainobject.Show();
this.Close();


NOTE: I'm using the Rows.Add(); function, so I know it SHOULD be adding items properly. But if I try to add an item to ANOTHER category, the previous item disappears anyway.