Конпонента...

12 отговора 0 прегледа
#1

Конпонента...

ми трябва, която да извършва търсене като в Access?
Има ли такова чудо?

Отговор
в отговор на AйeзCeдaй #2

Re: Конпонента...

Това пък какво е?

Отговор
в отговор на AйeзCeдaй #3

Re: Конпонента...

Не.

Mixy
Отговор
в отговор на Ивaнчo #4

Re: Конпонента...

Ами в Акссес имаш таблица с 5 полета.
Отиваш в/у кое да е поле и щракаш с ляв бутон - излиза ти едно меню, грубо казано
Филтър за .....
Филтър всичко без ....

Иам ли такова или подобно чудо, те това питам....

Може би някакъв грид??? С някакви подобни глезотийки

Редактирано от AйeзCeдaй на

Отговор
в отговор на AйeзCeдaй #5

EhLib

DBGridEh от пакета EhLib има нещо такова.

Отговор
в отговор на andrew_nikoloff #6

Re: EhLib

Намерих го free, свалих го, инстрилах го...

И сега как да го напеаря този морафет...

Отговор
в отговор на AйeзCeдaй #7

Ами то си пише в help-а, ама кой да чете...

Using DBGridEh for sorting and filtering data in the DataSet.

DBGridEh can not sort or filter data by itself. But it can pass action for sorting or filtering to the specal object that will do it in DataSet. You can adjust grid fot a two type of sorting (local or server), using property SortLocal and two type of filtering (also, local and server), but real possibility to aplly each type of operation depended of the type of DataSet. For instance, TBDEDataSet does not suppot sorting locally (inside DataSet) so you can not sort data locally when grid is linked to TQuery or TTable. Furthermore, EhLib have only special objects for standart type of Data Set (not for a third party DataSet's).

Below you can see a table of special object and DataSet in witch these objects can sort or filter data.


Unit DataSet Local sorting Server sorting Local filtering Server filtering

EhLibBDE TQuery, TTable N Y Y Y
EhLibADO TADOQuery, Y Y Y Y

TADODataSet

EhLibCDS TClientDataSet Y Y Y Y
EhLibDBX TSQLQuery,

TSQLDataSet N Y N Y

EhLibIBX TIBQuery,

TIBDataSet N Y Y Y

When grid is adjusted for a local filtering the special object will build exprression and assign it to a property Filter of DataSet. So need also to set Filtered to True manually.

When grid is adjusted for a server filtering, the special object will build SQL:ORDER BY exprression and replace ORDER BY string in SQL or Command property of DataSet and reopen DataSet.

When grid is adjusted for a local sorting the special object will do a sorting using specific of the type of DataSet.

When grid is adjusted for a server sorting the special object will build expression for SQL 'WHERE' clause in SQL string of dataset. It will try to found string that begining from key string '/*Filter*/'(You can change this key string using global variable - SQLFilterMarker) in SQL expression a nd adds filter expression after this string in same line. So your SQL query have to have a line that begining from '/*Filter*/'. For instance:

' select *

from table1

where

/*Filter*/ 1=1 '

For automatically filtering/sorting data in dataset need to add one of the units EhLibXXX (EhLibADO, EhLibBDE, EhLibCDS ... dependenly of the dataset that grid is linked to) to 'uses' clause of any unit of your project. This units have code to register TDatasetFeaturesEh based classes (special o bject) for respective DataSet's. For other third party DataSet's you have to write and register your own special object or you have to wrtie OnApplyFilter or/and OnSortMarkingChanged event for every required grid. More other, you can write OnApplySorting and/or OnApplyFilter for the global varia ble DBGridEhDataService. These events has TNotifyEvent type where Sender is TCustomDBGridEh.

EhLib Software


Отговор
в отговор на andrew_nikoloff #8

Re: Ами то си пише в help-а, ама кой да чете...

Хм, мерси... В същност успях да направя едно демо... но нещо не ми хареса как работо, т.е

като избера стойност от комбобокса (както е примерът) не ми филтрира записите.....Отивам да се ровя още...

Редактирано от AйeзCeдaй на

Отговор
в отговор на AйeзCeдaй #9

И на мен...

И на мен не ми харесва този начин на работа. Много е дървен и ограничен, но ти за такова нещо питаше
Иначе ние ползваме за тази цел PuterSoft FilterBox, което дава много по-големи възможности на потребителите да си определят филтъра за данните.


Отговор
в отговор на andrew_nikoloff #10

Ако ми...

кажеш и от къде да го дръпна... цена няма да имаш....

Отговор
в отговор на AйeзCeдaй #11

Re: Ако ми...

[линк], ама нещо не ми се зарежда. Може и да са фалирали

Отговор
в отговор на andrew_nikoloff #12

Re: Ако ми...

мдаа, рових се, но не успях да намеря от къде да го дръпна...

Отговор
в отговор на AйeзCeдaй #13

Re: Ако ми...

Ами в гоогле ? или [линк]

[линк]

---
Отговор