-
June 24th, 2013, 05:15 PM
#1
VB6 DataGrid Bookmark Error
When I scroll down a DataGrid, then select a row in the DataGrid, then rebind the DataGrid, the
DataGrid displays the rows starting with the very first row, DataGrid.Row = 0.
How do I reposition the DataGrid to display the row that was last selected?
The DataGrid is bound to a Command in the DataEnvironment.
I have tried the following code in the DataGrid.SelChange event, using the BookMark property,
where lastRow is declared as a Variant:
DataGrid1.Col = 0
lastRow = DataGrid1.Text
i = DataGrid1.Row
DataGrid1.Bookmark(i) = lastRow
When I run the code I get an error on the last line: "Run-time error '13': Type mismatch"
Any ideas? Thanks.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|