In the program I am currently creating, I have textboxes which when filled, add a row to the DataGridView.
I am wondering on how I can get it so when I confirm the textboxes and add the row to the DataGridView, get it to write to and save to a CSV file, with automatic saving.
Along with this, I want it so when I open/run the solution, for all the tasks to be loaded into the DataGridView.
Some side Question?
- How can I create it so that when a row is selected using a checkbox function on the DataGridView, to then send this row to another DataGridView in another form.
- Should I instead write all the data to TextFiles?
What I have tried:
The code below is used to create a new entry, when the textboxes are filled and the confrim button is pressed, it writes into a new Row on the dataGridView (dgvGeneral)
Private Sub btnAddTask_Click(sender As Object, e As EventArgs) Handles btnAddTask.Click
Dim dgvGeneralRow As Object() = New Object() {Nothing, txtTaskName.Text, txtTaskTag1.Text, cmbPriority.SelectedItem.ToString(),dateDUE.Value.ToShortDateString(), txtLink.Text, txtNoteEntry.Text}
dataGVGeneral.Rows.Add(dgvGeneralRow)
txtTaskName.Text = ""
txtTaskTag1.Text = ""
txtLink.Text = ""
txtNoteEntry.Text = ""