Label Filter

2 posts, 0 answers
  1. Tim Larson
    Tim Larson avatar
    19 posts
    Member since:
    Sep 2007

    Posted 17 Oct 2012 Link to this post

    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.
  2. Rosen Vladimirov
    Rosen Vladimirov avatar
    640 posts

    Posted 18 Oct 2012 Link to this post

    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.

    Rosen Vladimirov
    the Telerik team

    Explore the entire Telerik portfolio by downloading Telerik DevCraft Ultimate.

Back to Top