Subject | Re: Enable search to ib_grid |
---|---|
Author | Yagi |
Post date | 2001-02-13T21:50:57Z |
yhy, yhy.....
I checked IncSearching for the grid and it works. I've done a sample
applitacion in BCB5. Sorry i don't have Delphi. Maybe somebody can translate
it to Delphi?
Now a short tutorial how to get IncSearching in the grid:
1. Arrange your grid with your table (as you know IncSearch works on
ordering items so arrange this too)
2. Set AllowIncSearch = true
3. Set SearchKeyByKey, SeekNearest, AllowTimeout if you want so (see help on
IB_IncSearch and IB_Grid)
4. If the table is NOT readonly you MUST to set IncSearchHotKey.
This is the key combination which triger IncSearching and prevent grid from
changing data especially when AutoEdit = true for IB_DataSource.
For readonly table you don't have to set IncSearchHotKey.
A little digression: Now i see that IncSearchHotKey can be empty too when
Autoedit = false because pressing keys don't put the table into edit state
so we can autmoaticly triger IncSearching if AllowIncSearch = true.
5. How to see result of IncSearching on the grid? Use OnIncSearch event of
IB_Grid. For Example:
void __fastcall TMainForm::ibgrdCustomerIncSearch(TObject *Sender,
AnsiString Text, bool Match)
{
/*pnlCustomerGrid - the panel for viewing result of IncSearching*/
/*ibgrdCustomer - the grid*/
/*ibqCustomer - query being connected with the grid*/
if(ibgrdCustomer->IncSearchState)
{
if(pnlCustomerGrid->Color != ibqCustomer->IB_Session->SearchingColor)
pnlCustomerGrid->Color = ibqCustomer->IB_Session->SearchingColor;
pnlCustomerGrid->Caption = "Searching on " +
ibqCustomer->OrderingItems->IndexNames[abs(ibqCustomer->OrderingItemNo) - 1]
+ ": " +
Text;
}
else
{
pnlCustomerGrid->Color = clBtnFace;
pnlCustomerGrid->Caption = "";
}
}
6. To perform IncSearching, set focus on the grid
7. To cancel IncSearching hit ESC
8. To confirm IncSearching hit ENTER (especially when SearchKeyByKey =
false)
The rules of IncSearching on numeric and text fields are the same as for
IB_IncSearch component.
Well, Now i hope it will work for everybody how's interesting.
Jarek
I checked IncSearching for the grid and it works. I've done a sample
applitacion in BCB5. Sorry i don't have Delphi. Maybe somebody can translate
it to Delphi?
Now a short tutorial how to get IncSearching in the grid:
1. Arrange your grid with your table (as you know IncSearch works on
ordering items so arrange this too)
2. Set AllowIncSearch = true
3. Set SearchKeyByKey, SeekNearest, AllowTimeout if you want so (see help on
IB_IncSearch and IB_Grid)
4. If the table is NOT readonly you MUST to set IncSearchHotKey.
This is the key combination which triger IncSearching and prevent grid from
changing data especially when AutoEdit = true for IB_DataSource.
For readonly table you don't have to set IncSearchHotKey.
A little digression: Now i see that IncSearchHotKey can be empty too when
Autoedit = false because pressing keys don't put the table into edit state
so we can autmoaticly triger IncSearching if AllowIncSearch = true.
5. How to see result of IncSearching on the grid? Use OnIncSearch event of
IB_Grid. For Example:
void __fastcall TMainForm::ibgrdCustomerIncSearch(TObject *Sender,
AnsiString Text, bool Match)
{
/*pnlCustomerGrid - the panel for viewing result of IncSearching*/
/*ibgrdCustomer - the grid*/
/*ibqCustomer - query being connected with the grid*/
if(ibgrdCustomer->IncSearchState)
{
if(pnlCustomerGrid->Color != ibqCustomer->IB_Session->SearchingColor)
pnlCustomerGrid->Color = ibqCustomer->IB_Session->SearchingColor;
pnlCustomerGrid->Caption = "Searching on " +
ibqCustomer->OrderingItems->IndexNames[abs(ibqCustomer->OrderingItemNo) - 1]
+ ": " +
Text;
}
else
{
pnlCustomerGrid->Color = clBtnFace;
pnlCustomerGrid->Caption = "";
}
}
6. To perform IncSearching, set focus on the grid
7. To cancel IncSearching hit ESC
8. To confirm IncSearching hit ENTER (especially when SearchKeyByKey =
false)
The rules of IncSearching on numeric and text fields are the same as for
IB_IncSearch component.
Well, Now i hope it will work for everybody how's interesting.
Jarek
----- Original Message -----
From: Kaputnik <delphi@...>
To: <IBObjects@yahoogroups.com>
Sent: Tuesday, February 13, 2001 7:14 PM
Subject: RE: [IBO] Enable search to ib_grid
> ahem, ahem....
>
> I remember beeing able to search in the grid some time ago...
>
> I was always wondering the last time, if I was doing something wrong in my
> apps, as I never got IB_Grid to search-mode again.
>
> I have one app which was compiled with 3.5 or so and searching worked, and
> with the latest version, it doesn't work anymore.....
>
>
> CU, Kaputnik
> (Nick Josipovic)
>
> nick@... <mailto:nick@...>
> kap@... <mailto:kap@...>
> -----------------------------------------------------------------------
> superior Client/Server programming:
> www.IBObjects.com <http://www.ibobjects.com/>
> a nice Tool for Interbase:
> www.InterbaseWorkbench.com <http://www.InterbaseWorkbench.com>
>
>
> > -----Original Message-----
> > From: Yagi [mailto:yagi@...]
> > Sent: Tuesday, February 13, 2001 6:20 PM
> > To: IBObjects@yahoogroups.com
> > Subject: Odp: [IBO] Enable search to ib_grid
> >
> >
> >
> > Well, this funtionality was added a long time ago. My old project
> > when i use
> > it was build with IBO version 3.4.Ch. If you have changed nothing
> > it should
> > work. I try to make some example with current version and check
> > if serching
> > in IB_Grid works now. I try to describe how to use it too (with my poor
> > English :-))
> >
> > Jarek
> >
> > ----- Original Message -----
> > From: Jason Wharton <jwharton@...>
> > To: <IBObjects@yahoogroups.com>
> > Sent: Tuesday, February 13, 2001 5:05 PM
> > Subject: Re: [IBO] Enable search to ib_grid
> >
> >
> > > If you added it I was not sent the changes or they got hung up
somewhere
> > in
> > > the queue of things "to do".
> > >
> > > Right now I am in the mode of getting IBO v4 ready for BETA testing
and
> > > getting the current production version 3.6 absolutely rock solid. This
> > means
> > > I have been freezing new developments with only few exceptions. I am
for
> > > sure freezing new developments for 3.6 but your additions will
> > be welcome
> > in
> > > 4.x.
> > >
> > > Let me know.
> > >
> > > Regards,
> > > Jason Wharton
> > > CPS - Mesa AZ
> > > http://www.ibobjects.com
> > >
> > >
> > > ----- Original Message -----
> > > From: "Yagi" <yagi@...>
> > > To: <IBObjects@yahoogroups.com>
> > > Sent: Tuesday, February 13, 2001 8:50 AM
> > > Subject: Odp: [IBO] Enable search to ib_grid
> > >
> > >
> > > >
> > > > Jason Wharton <jwharton@...> wrote:
> > > >
> > > > > > I don't get to enable searches mode in IB_Grid
> > > > > > How do I do to enable?
> > > > >
> > > > > It is unsupported. use the TIB_SearchPanel control.
> > > > >
> > > >
> > > > Why? Sometimes ago it was added by me and worked fine. Is
> > there any bug
> > or
> > > > are you going to remove this from IB_Grid?
> > > > I had break for some time from IBO, but now i'm back and i can try
to
> > > help.
> > > >
> > > > Jarek
> >
> >
> >
> >
> >
> >
>
>
> Yahoo! Groups Sponsor
>
>
>
>
>
>
[Non-text portions of this message have been removed]