Subject Re: Grid search
From Robbie Nott <robnott@mweb.co.za>
Date Sat, 26 Sep 2020 09:46:33 +0200
Newsgroups dbase.getting-started

On 9/25/2020 3:37 PM, Akshat Kapoor wrote:
>> Now I just need to figure out how to catch the keys typed when the
>> grid has focus.
>> Thinking of a form variable to accumulate the keys typed within a
>> short period of time. This would get wiped after a certain pause.
>> Accumulate keys and perform a search after a pause.
>>
>> Thing is, dBase can't cancel a running search when a new key sequence
>> is typed - mmm
>>
>> Perhaps this is the point when I drop this line of exploration.
>> Thinking I would need to create a Thread that could be terminated at
>> will.
>>
>> SeekerSQL it is...
>>
>> Appreciate your interest and feedback
>> Your code is a delight to read
>
> Good Evening Ronnie,
> Placing a entryfield near the grid and then searching is damn easier
> than grid having focus and searching.
> Grid doesnot have a onKey event.
>
> Moreover size of rowset will also be an issue.
>
> As searching all columns can never be an indexed search.
> And once this loop starts it may be difficult to break.
>
> I have used my code with a 4-5k rows and it takes time to scroll and
> search.
>
> I was searching for amounts also so I had to include all columns. In
> your case if it is just 2 or 3 columns then it would be easier to add a
> calculated field index it and search for it.
>
> I have attached another test code developed for demo only. It is not a
> production version.
> The earlier code was a deployed code.
> But still will give you ideas.
>
> Regards
> Akshat

Hi Akshat

Many thanks
This and you previous example will feature in my programs from now onwards

Simple and effective - I like it

Regards
Robbie