Hello and thank you in advance,
I can't find anything like this online and it's really bugging me.
I have a class and then I make a list of that class using a form and textboxes I assign the all the information to it.
Then the list is pushed to a DataGridView.
But I need to add data and use the data in different forms. And because it's not a shared list or like a global variable I have to do this
Dim Employees As New List(Of EmployeeProfile)
or the code won't work. But that cocks up the adding it to the DataGridView process.
So I need to take the data from different textboxes on different forms pass it to the class, add it to the list and then take that and put it into the DataGridView without having to Delcare more Employees as Lists of EmployeeProfile and without overwriting data already there.
If that makes sense you can probably help.
Different form's Textboxes --> Lists --> DataGridView.
I can't find anything like this online and it's really bugging me.
I have a class and then I make a list of that class using a form and textboxes I assign the all the information to it.
Then the list is pushed to a DataGridView.
But I need to add data and use the data in different forms. And because it's not a shared list or like a global variable I have to do this
Dim Employees As New List(Of EmployeeProfile)
or the code won't work. But that cocks up the adding it to the DataGridView process.
So I need to take the data from different textboxes on different forms pass it to the class, add it to the list and then take that and put it into the DataGridView without having to Delcare more Employees as Lists of EmployeeProfile and without overwriting data already there.
If that makes sense you can probably help.
Different form's Textboxes --> Lists --> DataGridView.