-2

I want to view data from my database using the datagridview, what possible code can i use:

Private Sub DataGridView1_CellContentClick(sender As Object, e As DataGridViewCellEventArgs) Handles DataGridView1.CellContentClick

End Sub

I'm using VB for the code.

1
  • SO is not a code writing service, please add your attempts and research to the question. Follow the how-to-ask guide Commented Oct 28, 2019 at 0:34

1 Answer 1

0

There are lot of answers regarding this task here on the StackOverflow and also else where. Here is one example how to import data from mysql database to datagridview.

But why are you trying to use CellContentClick? Do you want to load data when a cell is clicked? Be aware, this event will only work if you click cell's content, i.e. the text. If you miss the text (content), it won't be fired. For a [whole] cell click, use CellClick. But perhaps you're lost and want something absolutely different, like run it from a button. It's difficult to tell, if you don't provide enough information.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.