andrewktmeikle 0 Newbie Poster

Hey, I've got a datagrid which depending on fields that the user fills in will display some data, code is :

Try
            queryList = LSet(queryList, Len(queryList) - 4)
            'TODO: This line of code loads data into the 'VbDataBaseDataSet.marketingDB' table. You can move, or remove it, as needed.
            Me.MarketingDBTableAdapter.Fill(Me.VbDataBaseDataSet.marketingDB)

            Dim cn As New OleDbConnection()
            cn.ConnectionString = "Provider=Microsoft.Jet.OLEDB.4.0;Data Source=\\Wise-fps01\shared\vbDataBase.mdb"
            cn.Open()

            Dim command As OleDbCommand = New OleDbCommand("SELECT * FROM marketingDB WHERE " & queryList, cn)
            command.CommandType = CommandType.Text

            Dim adapter As OleDbDataAdapter = New OleDbDataAdapter(command)

            Dim table As New DataTable

            adapter.Fill(table)
            cn.Close()
            DataGridView1.DataSource = table
            DataGridView1.Update()
        Catch ex As Exception
            System.Console.WriteLine("There was an error please try your query again")


        End Try

where query list is a list of conditions to filter the db on.

What i've been asked to do is that whenever someone clicks on a row,i.e the side part of the datagrid that selects the whole row, to change to another form and display the contents of that entry on a form that looks like the attached pic.

I've just got no idea how to go about getting the contents of a datagrid row once its clicked :(

Any help you can give me would be appreciated as always