here is a coding from Taiwan HP, someone claim that this code has an idea to do incremental search of combox in grid!
But I need to debug a lot as his coding is not mature enough...
Would it work or find any bugs, pls help!
Pre Setting:
cobGrd.controlsource = Orditems.item
cobGrd.Rowsource = item
cobGrd.RowsourceType = 2 && alias and suppose item.item is 1st field
Proc.:
* cobGrd.Interactivechange()
select (This.RowSource)
xpos = this.selstart
SearchField = this.RowSource + Right(This.controlsource, LEN(This.Controlsource) - Rat(".", This.controlsource)+1)
*messagebox("&SearchField VALUE IS:"+CHR(13)+EVAL("&SearchField") + " : " + this.text, 64, "msg") && Debuging message
SearchValue = EVAL("&SearchField")
if alltrim(This.text) <> alltrim(SearchValue)
locate for SearchField = Substr(This.text, 1, xpos)
if .not.eof()
this.displayvalue = EVAL("&SearchField")
endif
endif
endif
This.selstart = xpos
* cobGrd.Valid()
This.value = this.displayValue
Replace (this.controlsource) with this.value
Since this CobGrd is not mature enough, I need help and consider is it
possible to do search in grid!
Anyway, it is for interest only, I have drop the idea on using Combox in grid for many data!
The weak wait for chance, The strong bid for chance,
The clever notch up chance, but The merciful give you chance.