Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

RESHOWING ADOGRID  WHEN I WANT TO GO BACKWARDS FROM ROW 30000 TO ROW 100

Posted on 2004-09-14
7
Medium Priority
?
229 Views
Last Modified: 2010-04-17
While typing in a txtbox on event change I do this to let the grid scroll with any
character typed
Only one problem  ,  first records starts at  AB-001  untill ZZZ-9999 last,
grid has 30000 records,  so when I start typing e.g.   NIC-123 grid scrolls
ok to first found,    but if I make type error like NIX- and do backspace
grid is not scrolling  backwards because it passed that row already
How to make it scrolling backwards  specialy if you would go like back to N,
or even back to nothing and want to start with e.g. BA  etc.
Clicking op adocontrol <<  would solve but thats not what I want.

Private Sub TxtCustomerSearch_Change()
Dim Count As Integer
Dim LastRow As Boolean
On Error GoTo ErrHandle:
    Count = 0
    Do Until LastRow
        Customgrid.Row = Count
        Customgrid.Col = 1
        If UCase(Mid(Customgrid.Text, 1, Len(TxtCustomerSearch.Text))) = UCase(TxtCustomerSearch.Text) Then
            DisplayFields
            exit sub
            End If
       Count = Count + 1
    Loop
  ErrHandle:
End Sub

0
Comment
Question by:BIAPRO
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 4
  • 3
7 Comments
 
LVL 3

Expert Comment

by:RacinRan
ID: 12055840
Determine if the backspace key was pressed and set your counter = -1 instead of +1
0
 

Author Comment

by:BIAPRO
ID: 12056769
If life was that simple,  if you take a good look at source you will see that depending
on value of keyhit it could be that differance between last hit(and thus bookmark in grid) and keyvalue before doing backspace based on alfa value can be more then -1 could be -80 as example.
0
 
LVL 3

Expert Comment

by:RacinRan
ID: 12056870
Doesn't your code loop through the rows looking for the text string that has been typed so far?
0
Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

 

Author Comment

by:BIAPRO
ID: 12056984
the problem will be in adogrid that only last 60 records read are in memory/buffer/screen whatever you name it. so even putting customgrid.Row =0 won't work if the bookmark is due to typing e.g. YX-123  allready something like 20000, so lowering custogrid.Row even with 200 will not reshow grid on screen, so how about 10000 backwards.
Jack
0
 
LVL 3

Expert Comment

by:RacinRan
ID: 12057093
are you in vb 6 or .net?
0
 

Author Comment

by:BIAPRO
ID: 12057204
VB6  with Pervasive (btrieve)
0
 
LVL 3

Accepted Solution

by:
RacinRan earned 500 total points
ID: 12057411
If this is being displayed in a grid it should be a datagrid.  Instead of using an ado control to handle the recordset your probably going to have to handle it yourself.  That means declaring a recordset and filling it with all 30K records and then use that as the data source for your grid so you can see all the records.  As you scroll you'll scroll through the recordset object and then refresh the datagrid to match the current state of the recordset to keep them in sync.
0

Featured Post

On Demand Webinar: Networking for the Cloud Era

Ready to improve network connectivity? Watch this webinar to learn how SD-WANs and a one-click instant connect tool can boost provisions, deployment, and management of your cloud connection.

Question has a verified solution.

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

In this post we will learn different types of Android Layout and some basics of an Android App.
Today, the web development industry is booming, and many people consider it to be their vocation. The question you may be asking yourself is – how do I become a web developer?
With the power of JIRA, there's an unlimited number of ways you can customize it, use it and benefit from it. With that in mind, there's bound to be things that I wasn't able to cover in this course. With this summary we'll look at some places to go…
Progress

722 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