srussell705
Programmer
For some reason the bound consept of the Flexgrid is not loading data into the grid. I guess I am missing some simple point?
So i am forcing a load manualy. Unfortunatly when the grid is shown, I see a repeat of the last row for every row in my grid.
I have a rs loaded, and it has rs(3) as a max index.
Set rs = cnFleet.Execute(sql)
' Set Me.dgOutstanding.DataSource = rs fails to load?
With dgOutstanding
.FormatString = "^Charge Date|^Charge Amount|^Curr Status|^Charge Created"
.AllowUserResizing = flexResizeColumns
.ColWidth(0) = 1000: 'date for
.ColWidth(1) = 1500: 'amount
.ColWidth(2) = 1000: 'status
.ColWidth(3) = 1000: 'posted date
End With
If rs.EOF = False Then
rs.MoveFirst
Do Until rs.EOF = True
If i > 1 Then
Me.dgOutstanding.Rows = i + 1
'Me.dgOutstanding.RowSel + 1
End If
' Fill the grid col by col
Do Until ii = rs.Fields.count
Me.dgOutstanding.RowSel = i
Me.dgOutstanding.ColSel = ii
' Me.dgOutstanding.FillStyle = flexFillRepeat
Me.dgOutstanding.Text = rs(ii)
' update the col counter
ii = ii + 1
Loop
' reset the col counter
ii = 0
'update the row counter
i = i + 1 ' row
rs.MoveNext
Loop
End If
Set rs = Nothing
'Me.dgOutstanding.Refresh
for some reason I change the display of data if I change the # of fixed cols from 0 to 4. If it's 0 the same last date col is visible for the entire grid in each col? If I put the maxcol to 3 I get changing data. Makes no sense
Anyone see what I am doing wrong?
TIA
__stephen
So i am forcing a load manualy. Unfortunatly when the grid is shown, I see a repeat of the last row for every row in my grid.
I have a rs loaded, and it has rs(3) as a max index.
Set rs = cnFleet.Execute(sql)
' Set Me.dgOutstanding.DataSource = rs fails to load?
With dgOutstanding
.FormatString = "^Charge Date|^Charge Amount|^Curr Status|^Charge Created"
.AllowUserResizing = flexResizeColumns
.ColWidth(0) = 1000: 'date for
.ColWidth(1) = 1500: 'amount
.ColWidth(2) = 1000: 'status
.ColWidth(3) = 1000: 'posted date
End With
If rs.EOF = False Then
rs.MoveFirst
Do Until rs.EOF = True
If i > 1 Then
Me.dgOutstanding.Rows = i + 1
'Me.dgOutstanding.RowSel + 1
End If
' Fill the grid col by col
Do Until ii = rs.Fields.count
Me.dgOutstanding.RowSel = i
Me.dgOutstanding.ColSel = ii
' Me.dgOutstanding.FillStyle = flexFillRepeat
Me.dgOutstanding.Text = rs(ii)
' update the col counter
ii = ii + 1
Loop
' reset the col counter
ii = 0
'update the row counter
i = i + 1 ' row
rs.MoveNext
Loop
End If
Set rs = Nothing
'Me.dgOutstanding.Refresh
for some reason I change the display of data if I change the # of fixed cols from 0 to 4. If it's 0 the same last date col is visible for the entire grid in each col? If I put the maxcol to 3 I get changing data. Makes no sense
Anyone see what I am doing wrong?
TIA
__stephen