Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Datagrid Help
#1
Hello everybody! I just made a program that contains a datagridview. Is there a way to make information in a datagridview display in labels or textboxes?
#2
Hmmm. Well, I think getting the data from a datagridview cell is pretty simple. All you need is the cell column and cell row. Then, you can get the value with this:
[code2=vbnet]Dim cIndex As Integer = 3 'Column Index
Dim rIndex As Integer = 5 'Row Index

Label1.Text =
Me.DataGridView1.Item(cIndex, rIndex).Value.ToString[/code2]

Hope this helps.
My Blog | My Setup | My Videos | Have a wonderful day.
#3
That looks like it would solve my problem. Would this method work with databases that contain over 700,000 entries? And Would it be able to work with null values?
#4
Actually, nevermind. I found a super easy way to make it happen. When you source the database just go to textbox or label and in properties set the text to your sources database. Then keep working down until you find the feild you want <!-- sSmile --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="Smile" title="Smile" /><!-- sSmile -->
#5
Oh yeah! I forgot that you could do that! Awesome. Well I'm glad you figured it out!
My Blog | My Setup | My Videos | Have a wonderful day.


Forum Jump:


Users browsing this thread: 1 Guest(s)