Hi,
I am new to VB.net so at the moment I seem to be spending a lot of my time
searching for solutions to problems online. However this problem has me
stumped.
I have written a little program that as a part of it pulls information out
of a text file. What I want to do is display some of that information in a
datgridview.
I have managed to add the column headings using DataGridView1.Columns.Add,
but now I need to add data underneath these headings.
The program loops through a text file, splitting strings into smaller
strings. It is these smaller strings I want to add under the column headings.
Am I making sense? Is anyone able to help out?
Nils - 08 Mar 2008 15:48 GMT
A DataGridView is most often used to display data from a DataTable, so what
you probably want to do is create a DataSet and a DataTable, bind your
DatGridView to your DataTable and then add DataRows to your DataTable
containing the information you wish to display in the DataGridView using
DataTable.Rows.Add
Hope that helps.....
> Hi,
> I am new to VB.net so at the moment I seem to be spending a lot of my time
[quoted text clipped - 12 lines]
>
> Am I making sense? Is anyone able to help out?
RobinS - 10 Mar 2008 07:20 GMT
> Hi,
> I am new to VB.net so at the moment I seem to be spending a lot of my
[quoted text clipped - 14 lines]
>
> Am I making sense? Is anyone able to help out?
Why can't you just add new rows, and set the value in each cell? Is that
what you're looking for?
RobinS.