Hi,
I am using Visual Basic 2005. I have a DataGridView control on a windows form.
Now I have populated the DataGridView control via a query from a MySQL Database using the MySQL Connector/Net 1.0.
I am able to populate the DataGridView with a bunch of data. Currently I have the datagrid set as uneditable.
What I want to do is be able to store the data of the SELECTED row when a user clicks once on a row in the DataGridView.
The datagrid view has a TournamentName, TournamentDate and TournamentLocation.
What I am ending up wanting to do, is when the app is run, you highlight a row by clicking once on the datagridview, and then clicking a edit button, after clicking the edit button it is then going to populate another new window form with the details of that tournament.
I had tried doing this,
Dim SelectedRow As ArrayList
SelectedRow = dgvTournaments.SelectedRows
But that just spat a error at build time of how the dgvTournaments.SelectedRows cannot be converted to arraylist.
Pretty much once its in a array then i can just select the TournamentName from it and set it as a variable to pass on to the new edit form.
Any help would be greatly appreciated.
Anyone who knows where to look on the net for a good tutorial of using the datagrid control with the mysql .net connector dll file would also be of great help to me.
thanks.
I am using Visual Basic 2005. I have a DataGridView control on a windows form.
Now I have populated the DataGridView control via a query from a MySQL Database using the MySQL Connector/Net 1.0.
I am able to populate the DataGridView with a bunch of data. Currently I have the datagrid set as uneditable.
What I want to do is be able to store the data of the SELECTED row when a user clicks once on a row in the DataGridView.
The datagrid view has a TournamentName, TournamentDate and TournamentLocation.
What I am ending up wanting to do, is when the app is run, you highlight a row by clicking once on the datagridview, and then clicking a edit button, after clicking the edit button it is then going to populate another new window form with the details of that tournament.
I had tried doing this,
Dim SelectedRow As ArrayList
SelectedRow = dgvTournaments.SelectedRows
But that just spat a error at build time of how the dgvTournaments.SelectedRows cannot be converted to arraylist.
Pretty much once its in a array then i can just select the TournamentName from it and set it as a variable to pass on to the new edit form.
Any help would be greatly appreciated.
Anyone who knows where to look on the net for a good tutorial of using the datagrid control with the mysql .net connector dll file would also be of great help to me.
thanks.