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

Label Filter

1 Answer 50 Views
PivotGrid
This is a migrated thread and some comments may be shown as answers.
Tim Larson
Top achievements
Rank 1
Tim Larson asked on 17 Oct 2012, 09:36 PM
Is it possible to use wildcards in the label filter?
Ex.: I want to filter all the days that begin with S and end with Y

I tried S*Y and it doesn't return anything.
Thanks,
Tim

1 Answer, 1 is accepted

Sort by
0
Rosen Vladimirov
Telerik team
answered on 18 Oct 2012, 10:41 AM
Hello Tim,

With the current release we don't have default wildcards, but you can implement your own by using Regex. You can create a new class and inherit Telerik.Pivot.Core.Condition. You'll notice two important methods there:  CreateInstanceCore and CloneCore. In the first one you should create a new object from this class and in the second one you can copy all of your properties. The other very important method is PassesFilter where "the magic happens" - this is the place where you can match your regular expression.

To illustrate this we have prepared a simple project for you - please check it and inform us if you have any problems or concerns. If you want to use wildcards you'll have to add some more code - replace the "*" with ".*" on all places, add escape characters to the special regex symbols, etc...

Hopefully this helps.

Greetings,
Rosen Vladimirov
the Telerik team

Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Tags
PivotGrid
Asked by
Tim Larson
Top achievements
Rank 1
Answers by
Rosen Vladimirov
Telerik team
Share this question
or