08-13-2012, 08:10 AM
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?
Datagrid Help
|
08-13-2012, 08:10 AM
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?
08-13-2012, 08:57 PM
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.
08-14-2012, 07:24 AM
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?
08-14-2012, 08:07 AM
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 <!-- s --><img src="{SMILIES_PATH}/icon_e_smile.gif" alt="" title="Smile" /><!-- s -->
|
« Next Oldest | Next Newest »
|