Home > Back-end >  BCB6 cannot use Ehlib DBGridEh control data filtering functions
BCB6 cannot use Ehlib DBGridEh control data filtering functions

Time:10-12

1) BCB6.0
2) installed EhLib5.6.215, installed correctly.
3) set up the way for DELPHI
//automatic filtering
DBGridEh1. The DataSource:=DataSource1;
DataSource1. The DataSet:=MemTableEh1;
MemTableEh1. DataDriver:=DataSetDriverEh1;
MemTableEh1. FetchAllOnOpen:=True;
DataSetDriverEh1. ProviderDataSet:=ADOQuery1;
//-- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
DBGridEh1. STFilter. InstantApply:=True;
DBGridEh1. STFilter. Local:=True;
DBGridEh1. STFilter. Visible:=True;
DBGridEh1. STFilter. Location:=stflInTitleFilterEh;//stflUnderTit
//
__fastcall TForm1: : TForm1 (TComponent * Owner)
: TForm (the Owner)
{
DBGridEhCenter () - & gt; FilterEditCloseUpApplyFilter=True;
}
After running effect as the chart, the data filter list click no data filtering,
Masters to help you, please have a look at where is the problem.

CodePudding user response:

Join EhLibMTE. Pas files, recompile, implement the data filter function

CodePudding user response:

Upstairs, positive solutions to join EhLibMTE. Pas

CodePudding user response:

There is no need to add EhLibMTE. Pas...
In c + + Builder using the steps as follows:
Step 1: first is set as follows:
 # pragma link "EhlibADO" EhlibADO//connection. It is necessary to pas! 
Void __fastcall TForm1: : FormCreate (TObject * Sender)
{
//set the filter tag
SQLFilterMarker="1=1" AND ";//must be introduced in h file # include "DbUtilsEh. HPP
"}

Step 2: specify the Query SQL narrative DataSet are as follows:
 SELECT * 
FROM the data table
WHERE
1=1 AND 1=1

CodePudding user response:

Were it not for the use of ADO database... In accordance with the actual use of database type EhlibBDE add connection. EhlibDBX. EhlibIBX. EhlibMTE. EhlibCDS... Such as...

CodePudding user response:

Delphi global variables in the initialization, it is dispersed in many pas file initialization period, the difference is very big, in c + +
Cause CB pas files used in the function, some obj must specify the link, can normal use.

I don't approve of initialization period of practice, this is not a good programmer control initialization time, at the same time also can cause load multiple BPL packages, because extra initialization time, causing poor user experience,

Such as: use XXX series before class, you need to perform the initialization section A, use YYY series before class, you need to perform the initialization section B, they are in the same BPL package, loading will be loaded at the same time execution period of AB, and the function of the user is useless to YYY series, have to do the initialization of YYY series, many controls with the problem.

Delphi programs to run a belt bag, load of third-party packages, start is slow, it needs to be checked every dependencies between packages, to perform the initialization section in the package, in a DLL, the fast will be a lot of,

CodePudding user response:

reference 5 floor PPower reply:
Delphi global variable initialization, are scattered in many pas file initialization period, the difference is very big, in c + +
Cause CB pas files used in the function, some obj must specify the link, can normal use.

I don't approve of initialization period of practice, this is not a good programmer control initialization time, at the same time also can cause load multiple BPL packages, because extra initialization time, causing poor user experience,

Such as: use XXX series before class, you need to perform the initialization section A, use YYY series before class, you need to perform the initialization section B, they are in the same BPL package, loading will be loaded at the same time execution period of AB, and the function of the user is useless to YYY series, have to do the initialization of YYY series, many controls with the problem.

A belt run Delphi program package, loading of third-party packages, start is slow, it needs to be checked every dependencies between packages, to perform the initialization section in the package, in a DLL, speed will quickly,

Thank PPower provide valuable knowledge and experience... To learn!
  • Related