Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: onytoo
  Where is onytoo?
 Padang
 Indonesia
 onytoo
 To: Gerrit Broekhuis
  Where is Gerrit Broekhuis?
 Holten
 Netherlands
 Gerrit Broekhuis
 Tags
Subject: RE: INGRID class for numeric increm. search
Thread ID: 289292 Message ID: 289298 # Views: 42 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Grids
Date: Thursday, December 30, 2010 1:31:03 PM         
   


> Hi,
>
> I'm many of my grid columns I use the INGRID class for incremental search (see zip file). For testing: add the ingrid class to a grid and set the grid column's currentcontrol to "Ingrid1"
> This works allright for text fields, but not with numeric values.
> What should I change in this class to enable incremental search for numeric fields in a column?
> I don't intend to use another class, because INGRID is used in too many grids already in various applications.
>
> Regards, Gerrit
>
> https://www.foxite.com/uploads/63492731-8265-4713-94b9-c67e23e7125e.zip

Hi Gerrit

I not understand yet what exactly your class doing and how to use it.
But if look in KeySeek method, maybe you can change the code below to evaluate numeric value

cHoldAlias = ALIAS()
SELECT (THIS.Parent.Parent.RecordSource)
IF !EMPTY(THIS.cLocateExpression)
	GO TOP
*!*	LOCATE FOR EVAL(THIS.cLocateExpression) = THIS.cSearchString
	lcVT = VARTYPE(EVALUATE(this.cLocateExpression))
	DO CASE
	CASE lcVT == [N]
		LOCATE FOR EVALUATE(this.cLocateExpression) = EVALUATE(this.cSearchString)
	CASE lcVT == [C]
		LOCATE FOR EVALUATE(this.cLocateExpression) = this.cSearchString
	ENDCASE
ELSE
	IF !EMPTY(THIS.cSeekTag)
		m.cHoldTag = ORDER()
		SET ORDER TO THIS.cSeekTag
	ENDIF
	lcVT = VARTYPE(EVALUATE(this.ControlSource))
	DO CASE
	CASE lcVT == [N]
		SEEK (EVALUATE(THIS.cSearchString))
	CASE lcVT == [C]
		SEEK (THIS.cSearchString)
	ENDCASE
	&& SEEK (UPPER(THIS.cSearchString))	&& gewijzigd 16-06-2008
	*!* SEEK (THIS.cSearchString)
ENDIF


sorry, edited twice! my bad.


Regards,
Onytoo

ENTIRE THREAD

INGRID class for numeric increm. search Posted by Gerrit Broekhuis @ 12/30/2010 11:44:09 AM
RE: INGRID class for numeric increm. search Posted by Ony Too @ 12/30/2010 1:31:03 PM
RE: INGRID class for numeric increm. search Posted by Rajesh Malhotra @ 12/30/2010 1:31:08 PM