PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, May 18, 2022

[FIXED] How to search for partial matches in numbers using SlickGrid header row?

 May 18, 2022     header, match, partial, slickgrid     No comments   

Issue

I'm trying to perform partial matches in the header row example for SlickGrid.

I used the answer here: How to perform partial matches when filtering Slickgrid using column-level headers?

Which does do partial matches on text but will not do partial matches on numbers. Does anyone know how to do partial matches on both? Some of my columns have text and some have numbers and I want to be able to filter by each column.


Solution

Store your numbers as text in the grid data. Then this method should work for numbers as well. Same applies to boolean and dates as well.

If you want to keep using numbers though, you could check for the variable type in your filter using the typeof function and adding a new condition to handle number matches.



Answered By - ganeshk
Answer Checked By - Marie Seifert (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing