This is a migrated thread and some comments may be shown as answers.

Custom Filter

2 Answers 74 Views
GridView
This is a migrated thread and some comments may be shown as answers.
Dominik
Top achievements
Rank 1
Dominik asked on 20 Feb 2017, 04:05 PM

Hi, 

i made a custom filtering in my Grid. I have a FilterCell with a "FilterClearButton" and I confirm my FilterCellEntry with the Keys "Enter" or Tab. 

I also set these properties:

            loGridFilterCellElement:FilterButton:Visibility = Telerik.WinControls.ElementVisibility:Collapsed
            loGridFilterCellElement:FilterOperatorText:Visibility = Telerik.WinControls.ElementVisibility:Collapsed

 

When I leave my Filtercell(CellEndEdit Event), I make a new Filterdescriptor.

         loFilterDescriptor = NEW Telerik.WinControls.Data.FilterDescriptor().
         loFilterDescriptor:Operator = Telerik.WinControls.Data.FilterOperator:Contains.
         loFilterDescriptor:PropertyName = poGridViewDataColumn:Name.
         loFilterDescriptor:IsFilterEditor = TRUE.
         loFilterDescriptor:VALUE = poVal.

and add it to the FilterDescriptorCollection of my Grid.

         THIS-OBJECT:FilterDescriptors:BeginUpdate().

         THIS-OBJECT:FilterDescriptors:Add(loFilterDescriptor).
         THIS-OBJECT:FilterDescriptors:EndUpdate().

 

So far, there is no problem but if I filter a column for "Dom" and in my Grid there are two entries in this column with "Zöbl Dominik" and "test user" the Grid is empty. But if I enter "Zöb" in my Filtercell and leave it, the Entry "Zöbl Dominik" is shown in my Grid.

 

I think i have missed some property or other setting. It seems like it is filtering with "Begins" and not contains but I already iterated through oll the FilterDescriptors of my Grid and all are with "Contains". 

I know it is not easy to help me in that case because I made a lot of these extras myself but does anybody have an idea what i have made false?

Sincerely,

Dominik Zöbl

2 Answers, 1 is accepted

Sort by
0
Dominik
Top achievements
Rank 1
answered on 21 Feb 2017, 09:30 AM
Okey it was just a very very stupid failure from me. already fixed it.
0
Accepted
Hristo
Telerik team
answered on 21 Feb 2017, 11:28 AM
Hello Dominik,

I am glad that you have resolved the issue. 

I tried reproducing it locally without success. It appears to be related to the custom implementation you are having on your end.

Please let me know if you need further assistance.

Regards,
Hristo
Telerik by Progress
Try our brand new, jQuery-free Angular 2 components built from ground-up which deliver the business app essential building blocks - a grid component, data visualization (charts) and form elements.
Tags
GridView
Asked by
Dominik
Top achievements
Rank 1
Answers by
Dominik
Top achievements
Rank 1
Hristo
Telerik team
Share this question
or