Subject | RE: [IBO] IB_Grid SearchKeyByKey |
---|---|
Author | Jason Wharton |
Post date | 2007-11-20T00:50:21Z |
Make sure you setup the OrderingItems and OrderingLinks properties such that
you use the POS attribute in the OrderingLinks property. This tells what
character position the incremental searching should kick in at.
So, for example, if you had a column ordered by last name this is how it
should look:
OrderingItems:
NAME=MyTbl.LastName;MyTbl.LastName DESC
OrderingLinks:
MyTbl.LastName=ITEM=1;POS=3
What you will have is upon the third character typed the incremental
searching will begin. This is because it is going to automatically refresh
the underlying query to start fetching records that are STARTING WITH those
first three characters and then it will buffer up records as the 4th and
subsequent characters are pressed.
If you are searching for something with less than 3 characters ENTER should
go ahead and have it perform the search using what you have entered so far
as an override.
I have not exhaustively tested how well the incremental searching has been
integrated into TIB_Grid so I would like to have you make sure to try using
a separate TIB_IncSearch control as you learn and acquaint yourself with
IBO's capabilities and then we can more clearly distinguish if there are
issues with how the grid directly intereacts with the incremental searching
stuff.
Also, if you have columns that are integers, hitting return should do an
exact match for the number entered. If you have numeric ID's that are all
the same digits then you can set the POS attribute to that amount so that
when an integer is entered it will perform the search once all digits have
been entered.
Hope this helps.
Jason
you use the POS attribute in the OrderingLinks property. This tells what
character position the incremental searching should kick in at.
So, for example, if you had a column ordered by last name this is how it
should look:
OrderingItems:
NAME=MyTbl.LastName;MyTbl.LastName DESC
OrderingLinks:
MyTbl.LastName=ITEM=1;POS=3
What you will have is upon the third character typed the incremental
searching will begin. This is because it is going to automatically refresh
the underlying query to start fetching records that are STARTING WITH those
first three characters and then it will buffer up records as the 4th and
subsequent characters are pressed.
If you are searching for something with less than 3 characters ENTER should
go ahead and have it perform the search using what you have entered so far
as an override.
I have not exhaustively tested how well the incremental searching has been
integrated into TIB_Grid so I would like to have you make sure to try using
a separate TIB_IncSearch control as you learn and acquaint yourself with
IBO's capabilities and then we can more clearly distinguish if there are
issues with how the grid directly intereacts with the incremental searching
stuff.
Also, if you have columns that are integers, hitting return should do an
exact match for the number entered. If you have numeric ID's that are all
the same digits then you can set the POS attribute to that amount so that
when an integer is entered it will perform the search once all digits have
been entered.
Hope this helps.
Jason
> -----Original Message-----
> From: IBObjects@yahoogroups.com [mailto:IBObjects@yahoogroups.com]On
> Behalf Of jackmills75
> Sent: Sunday, November 18, 2007 4:20 AM
> To: IBObjects@yahoogroups.com
> Subject: [IBO] IB_Grid SearchKeyByKey
>
>
> I have a IB_Grid, IB_DataSource & a IB_Query. The query selects 3
> columns from a table, which are correctly displayed in the grid.
>
> I would like to click on a column & enter text & have the grid find
> the nearest match.
> When I click on any column, I can select the text but cant change it
> & nothing is found that matches the letter typed.
>
> Is this type of search available for this control? if it is, what am
> I not doing?
>
> I have AllowIncSearch, SearchKeyByKey & SeekNearest set to true,
> PreventEditing is set to false. The query has an orderby clause on
> one of the 3 columns.
>
> C++ Builder 6 OBObjects 4.6
>
> Thanks for any help.
>
> Jack
>
>
>
>
>
>
> ______________________________________________________________
> _____________
> IB Objects - direct, complete, custom connectivity to
> Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ______________________________________________________________
> _____________
> http://www.ibobjects.com - your IBO community resource for
> Tech Info papers,
> keyword-searchable FAQ, community code contributions and more
> !
> Yahoo! Groups Links
>
>
>