xpertwinner
Member
- Joined
- Dec 26, 2008
- Messages
- 24
- Programming Experience
- Beginner
I open a new form for the user to add a new record to the datatable.
I am using the code:
Dim row As RestricoesDataset.ComparaçãoRow = RestricoesDataset.Comparação.NewComparaçãoRow()
row.Mod1 = Mod1ComboBox.SelectedValue
row.Mod2 = Mod2ComboBox.SelectedValue
row.Comparação = ComparaçãoComboBox.SelectedValue
RestricoesDataset.Comparação.AddComparaçãoRow(row)
Me.Close()
When I press the add new row button, this code is executed, and I can see the new row in the datagridview. However, if I close and reopen the form, the row isnt there anymore. Am i not saving as I should?
I have other question. I read in a tutorial that I should dispose the datagridviews on form closing. However, when I reopen the form they aren't there anymore. How can I counter this effect?
Thanks in advance.
I am using the code:
Dim row As RestricoesDataset.ComparaçãoRow = RestricoesDataset.Comparação.NewComparaçãoRow()
row.Mod1 = Mod1ComboBox.SelectedValue
row.Mod2 = Mod2ComboBox.SelectedValue
row.Comparação = ComparaçãoComboBox.SelectedValue
RestricoesDataset.Comparação.AddComparaçãoRow(row)
Me.Close()
When I press the add new row button, this code is executed, and I can see the new row in the datagridview. However, if I close and reopen the form, the row isnt there anymore. Am i not saving as I should?
I have other question. I read in a tutorial that I should dispose the datagridviews on form closing. However, when I reopen the form they aren't there anymore. How can I counter this effect?
Thanks in advance.