ad rows to grid dynamically. not displaying the first row. URGENT PLEASE!
Posted on 2007-03-28
i need to know what i am doing wrong with the way i am adding rows to my grid.
the rows are being added, but the first row is been omitted, i think due to the way i set the header row.
So if i have serial number:
the grid only shows:
any help is greatly appreciated, thank you.
Const g_COL_SERIAL_NO = 0
If Not rstSelect Is Nothing Then
If Not rstSelect.BOF And Not rstSelect.EOF Then
Do While Not rstSelect.EOF
r = r + 1
grdSerialNumber.Rows = r + 1
For c = 0 To rstSelect.RecordCount - 1
strSerialNumber = rstSelect![serial_number]
grdSerialNumber.FormatString = "Serial No"
grdSerialNumber.ColWidth(g_COL_SERIAL_NO) = 1335
grdSerialNumber.TextMatrix(totalRecs, 0) = strSerialNumber
totalRecs = totalRecs + 1
' Do nothing