can somebody point me to working "increment" Seek
Incremental seek works automatically if the programmer does not do anything to disturb the automatic behavior of xbrowse.
- Code: Select all Expand view RUN
XBROWSER "any.dbf" AUTOSORT
Start clicking on any header and the order is changed and incremental seek / filter work automatically
a.) i guess it need an Index to SEEK. *CDX seems to be open "automatic" but *.NTX must be open before ?
Yes.
In case of DBFNTX, after USE, open indexes by
- Code: Select all Expand view RUN
SET INDEX TO .....
and it is ready.
b.) if *.CDX have TAGs, how to change TAG when click on Header of Column ?
XBrowse automatically does all this for us.
XBrowse searches all open indexes/tags and identifies which index/tag is to be used to sort on which column and stores the index/tag information in oCol:cSortOrder.
When the header is clicked, xbrowse automatically sets the index tag to oCol:cSortOrder, without disturbing the cuurent record pointer.
c.) what about ADO ?
Whether ADO or other sources like Mysql, postgre, etc. XBrowse derives the field name from the expression and stores the right information in oCol:cSortOrder. On header click, xbrowse uses this information to switch the sort order and it also knows depending on the datasource, how to change the sort order.
Better we leave all this to XBrowse.
can i use it on Recordset of Excel ?
Yes, you can. Clicking on header to sort the column and incremental seek/filter works just like any other datasource.
Inline Cell Edit:
Pressing Enter key starts inline cell edit, if the cell is editable.
[A reason why we should not disturb the internal behavior of XBrowse by assigning different actions to common keys using bKeyDown]
When FASTEDIT is true (oBrw:lFastEdit is .t.), pressing a permitted alpha numeric key starts inline cell edit, using that key as the first key of the Get.
Incremental Seek:
This is the default behavior of xbrowse unless we inhibit it by setting oBrw:lIncrSeek := .f.
if the data is sorted on any column and lFastEdit is not .t., pessing any key seeks the first row where the sorted column value begins with that character. Example, pressing "a" seeks value starting with "a" and again pressing "n" seeks "an" and so on.
If we set
oBrw:lSeekWild := .t.
Then xbrowse searches for entered value anywhere inside the field value.
if we set oBrw:lIncFilter, the entered keys are used to filter the data instead of seeking.
PS: Please do not disturb the internal behavior or xbrowse by using method keydown.