Filter (Blanks) Programmatically

5 posts, 0 answers
  1. Matthew
    Matthew avatar
    8 posts
    Member since:
    Sep 2017

    Posted 17 Sep Link to this post

    I am attempting to filter results in a RadGrid.

    What I am looking for is the programmatic equivalent of selecting the all but (blanks) or not (blanks) option from the filtering area.

    I will apply filters of " " and "" but still will get results of "   " or varying amounts of whitespace that I don't want in the results. I cannot do this with a composite filter as I cannot capture all of cases of whitespace, but removing (blanks) achieves the correct results.

    Thanks

  2. Matthew
    Matthew avatar
    8 posts
    Member since:
    Sep 2017

    Posted 17 Sep in reply to Matthew Link to this post

    Basically I want the equivalent filter of "All but (Blanks)"
  3. Dimitar
    Admin
    Dimitar avatar
    2818 posts

    Posted 18 Sep Link to this post

    Hello Matthew,

    This is not possible with the regular filter since it only has one value. When using the "Blanks" option from the drop-down the grid will iterate all rows and creates a composite filter (see attached). In this case, I would recommend doing the same. Another option is to use custom filtering

    I hope this helps. Should you have any other questions, do not hesitate to ask.

    Regards,
    Dimitar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
  4. Matthew
    Matthew avatar
    8 posts
    Member since:
    Sep 2017

    Posted 18 Sep Link to this post

    I appreciate pointing me in the right direction.

    For my solution I iterated through the rows and marked all cells as "invalid". Then I applied a filter for the string "invalid" so I can hide them but also see all offending rows.

    Thanks Dimitar,

     

  5. Dimitar
    Admin
    Dimitar avatar
    2818 posts

    Posted 19 Sep Link to this post

    Hello Matthew, 

    I am glad that you have found a solution to this. Do not hesitate to contact us if you have other questions.

    Regards,
    Dimitar
    Progress Telerik

    Get quickly onboarded and successful with your Telerik and/or Kendo UI products with the Virtual Classroom free technical training, available to all active customers. Learn More.
Back to Top