Solved

Why the value DataGrid.Row is limitted within 10

Posted on 2002-06-06
1
155 Views
Last Modified: 2010-05-02
The DataSource property of this DataGrid is an ADODC. After User change the data, I want the DataGrid focus on the Changed row. The Codes are:

    Dim lngBookID As Long
    'grd2Books is a DataGrid
    lngRePlace = grd2Books.Row 'Get the Current Row
   
    'Modify the Data
     ...............
    'adoBooks is ADODC, the DataSource of DataGrid
     adoBooks.Recordset.Move lngRePlace, adBookmarkFirst
       
But when I select the row after 10th, the value of lngReplace remains 9 for ever.  why??
0
Comment
Question by:Iaskyou
1 Comment
 
LVL 39

Accepted Solution

by:
appari earned 50 total points
ID: 7061254
grd2Books.Row  returns the current row no from visible rows.

for your purpose use grd2Books.Bookmark insted of grd2Books.Row




   Dim lngBookID As Long
   'grd2Books is a DataGrid
   'lngRePlace = grd2Books.Row 'Get the Current Row
   lngRePlace = grd2Books.Bookmark
   'Modify the Data
    ...............
   'adoBooks is ADODC, the DataSource of DataGrid
    adoBooks.Recordset.Move lngRePlace, adBookmarkFirst


hope this helps
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Check Disk (CHKDSK) on all volumes and fix if needed. 8 178
DIR issue 7 51
Exit a vb6 apps when a calling it apps closes 15 43
Spell Check in VB6 13 99
Introduction In a recent article (http://www.experts-exchange.com/A_7811-A-Better-Concatenate-Function.html) for the Excel community, I showed an improved version of the Excel Concatenate() function.  While writing that article I realized that no o…
You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
Get people started with the process of using Access VBA to control Outlook using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Microsoft Outlook. Using automation, an Access applic…
Show developers how to use a criteria form to limit the data that appears on an Access report. It is a common requirement that users can specify the criteria for a report at runtime. The easiest way to accomplish this is using a criteria form that a…

895 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now