Quantcast
Channel: VBForums
Viewing all articles
Browse latest Browse all 42466

fill list box with data from DGV

$
0
0
I have a DGV which has a few columns in it and 1 is File_Path

How would i get the data from the File_Path column of every row in the DGV and place the data in a list box

i tried this but i get an error saying the path format is incorrect AND when i look at the data that is put in the listbox it seems to be 1 character per line i.e

L
I
K
E
T
H
I
S

Code:

        Dim Cells As String = FilesDataGridView.Rows(0).Cells("File_Path").Value.ToString()

        For Each Pat In Cells

            ListBox1.Items.Add(Pat)

        Next


also i dont think it matters but its a databound DGV

Viewing all articles
Browse latest Browse all 42466

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>