Gridview Scroll issue
Posted: Thursday 26th October 2017 8:22pm
I want to display the last item(s) on a GridView display, not the first. I can do it but the values needed make no sense to me. Have a look at the attached program that demonstrates my query.
Thanks.
Thanks.
Public Sub ButtonStart_Click() 'When the 'Start' Button is clicked...
Dim iCount As Integer 'Counter
GridView1.Rows.count = 101 'Amount of Rows needed
GridView1.Columns.count = 1 'Amount of Columns needed
For iCount = 0 To 100 'Count from 0 to 100
GridView1[iCount, 0].Text = Str(iCount) 'Add the value to a 'Cell'
Next
For iCount = 0 To 2200 'Count from 0 to 2200
GridView1.Scroll(0, iCount) 'Move the 'Scroll Bar'
LabelNumber.text = "GridView1.Scroll(0, " & Str(iCount) & ")" 'Display the values
Wait 'Loop through the event loop
If iCount > 2100 Then Wait 0.25 'Slow things down at the end so that they can be seen
Next
Catch 'If you close the program while it is busy this will stop an error
End