|
-
Nov 3rd, 2006, 07:51 AM
#1
Fanatic Member
Re: read a row from database
OK. I think i understand now. What you can do is add the lyrics to the datagridview but then set that column's visible property to false. This way ithey will be in the dgv but the user wont be able to see them. Then you should probably create a button and call it 'Get lyrics' and inside the button place the code to get the lyrics from the dgv. This way you wont have to continually make a connection to get the lyrics because they will always be there (that just wont be apparent to the user). And because you are using a button you will only need to use the code once just make sure the user clicks on a cell in the row they require and the current row index will change accordingly. The only thing you will need to change in the code i provided above is that you will need to reference the datagridview by saying form1.datagridview1, so that it knows you are refering to that dgv.
Is this what you needed?
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|