Datagridview
Do you need something made? then ask in here.
Forum rules
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
Please LOCK your topics once you have found the solution to your question so we know you no longer require help with your query.
4 posts
Page 1 of 1
i can add items to the datagridview but i can't get it from there to a textbox or two, does somebody know what i most do to make it work?
Hello marve25,
Ive not had much experience using the datagridview myself but it should work similar to a listbox or listview. How are you wanting the datagridview items transferred to a textbox?
If you want to transfer data to a textbox after selecting it in the datagridview you should be able to use:
Ive not had much experience using the datagridview myself but it should work similar to a listbox or listview. How are you wanting the datagridview items transferred to a textbox?
If you want to transfer data to a textbox after selecting it in the datagridview you should be able to use:
Code: Select all
It depends how you want to tranfer the data?Textbox.Text = DataGridView1.SelectedCells.ToString()
Welcome to CodenStuff.com Learn Code, Love Code. Thank you for being a member of the community.
no, it didnt work, its just comes System.Windows.Forms.DataGridViewSelectedCellCollection in the textbox.
i tryed TextBox1.Text = DataGridView1.SelectedRows.Item(URL) to but it either doesnt work.
if i make it work i will use it on a webbrowser like Name and URL.
i tryed TextBox1.Text = DataGridView1.SelectedRows.Item(URL) to but it either doesnt work.
if i make it work i will use it on a webbrowser like Name and URL.
i founf it out, here is the code
Dim i As Integer
i = DataGridView1.CurrentRow.Index
TextBox1.Text = DataGridView1.Item(0, i).Value
TextBox2.Text = DataGridView1.Item(1, i).Value
TextBox3.Text = DataGridView1.Item(2, i).Value
TextBox4.Text = DataGridView1.Item(3, i).Value
Dim i As Integer
i = DataGridView1.CurrentRow.Index
TextBox1.Text = DataGridView1.Item(0, i).Value
TextBox2.Text = DataGridView1.Item(1, i).Value
TextBox3.Text = DataGridView1.Item(2, i).Value
TextBox4.Text = DataGridView1.Item(3, i).Value
4 posts
Page 1 of 1
Copyright Information
Copyright © Codenstuff.com 2020 - 2023