Results 1 to 3 of 3

Thread: Find and Select within Datagrid

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    45
    Hi,
    I'm using a Datagrid connected to an ADODC control. All data needed from the database is displayed and works just fine. My question is: How can I search the data displayed in the datagrid for a value to, when found, select. I want to do this without having the data in the datagrid scroll so the user can see it. The actuall scroll and row select should not be displayed for the user until I found the row I'm looking for.

    Right now I'm using:
    Adodc1.Recordset.MoveFirst
    Do While Not Adodc1.Recordset.EOF
    If Adodc1.Recordset.Fields(0).Value = "Test" Then
    'Here goes everything that needs to be done
    Exit Do
    End If
    Adodc1.Recordset.MoveNext
    Loop

    This piece of code works, but the user can see how I'm looping through all rows, and that's where I need your help to find a way to search without the user seeing it.

  2. #2

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    45
    Are you sure you can't help me out????

  3. #3
    Addicted Member
    Join Date
    Sep 2000
    Posts
    230
    Jess,

    One way is to not use the data control, instead control the recordset from within your code. The only thing the data contol buys you is the navigation of records of records via the control and ease of setup. If you come up with a way to hide the processing using the data control, please post it. Otherwise, if you need help programming the active data objects, let me know and I can help you.
    Shawn Hull
    VB6, SP3 (Professional Edition)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width