The way to do this is by setting up a DataTable at runtime and populating
that, then bind that to the datagrid.
Something like this
Dim DT as DataTable
DT.Columns.Add("NewColumn1")
DT.Columns.Add("NewColumn2")
for ii = 0 to 100
Dim DR as DataRow = DT.NewRow
DR.Item(0) = ii
DR.Item(1) = "Something"
DT.Rows.Add(DR)
next
DataGrid1.Datasource = DT
I didn't write that in the IDE so it might not be perfect, but that's the
idea right there.
Hope it helps
Chris
"fripper" <fr*****@insightbb.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I want to populate the cells of a DataGrid at run time. I don't want to
bind a database to it I simply want to do some calculations and put
results into the grid programmatically. I did this in VB 6.0 using the
FlexGrid control but the I cannot figure out how to specify the row/column
of the cell I want to set in the .Net DataGrid control and how to set its
value.
Thanks for your help.