assigning dataset to gridview in vb.net
Posted on 2013-12-27
For i = 0 To Dstworkcounter2.Tables(0).Rows.Count - 1
For j = 1 To 9
DataGridView1.Item(j - 1, i).Value = Dstworkcounter2.Tables(0).Rows(i).Item(j).ToString
have a valid dataset, don't want the first value from it
get a run time error that says the index is either negative or out of range.
i is zero and j is one at that point.
I just want to fill the datagridview with data. I remember something about turning off something in the datagridview properties.
anyone got a idea why I just can't do a simple assign to a datagridview like this?