Custom Grid View Filter - search all grid columns in a view

joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
edited May 30 in Cireson Uploads
Purpose: Allows quick searching of any text that may appear in a grid. After placing this script in customspace, it will add a textbox to the OOB work item views, allowing you to search all columns using minimal effort.

Tips and tricks: 
1. This script will set a filter on all columns. You can still set additional filters against a column the normal way, using hte column header.
2. When you want to clear all filters, you can press the escape key whenever the search textbox has focus.Alternatively, you can click on the Reset View button.



Download the attached zip file below:

Comments

  • TysonTyson Member IT Monkey ✭
    We have this installed in our environment and our users love it. Thanks JV!
  • Adrian_MataiszAdrian_Mataisz Customer Advanced IT Monkey ✭✭✭
    With multiple pages will filter show content from all pages or just the page you are in?
  • joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
    It will show results from all pages. 
    This does still respect the the GridViewRecordCap setting. For example, if your settings have the item GridViewRecordCap set to 2500 items, and your current view shows the maximum set number of 2500 items, then this search will only search those 2500 items in the grid (across all pages). 
  • Peter_NordqvistPeter_Nordqvist Customer IT Monkey ✭
    Is it possible to get this working on Promoted Views? Great solution btw :)
  • joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
    Aye, it is possible to make it work for promoted views, but would require a little bit of debugging. 

    I initially had some issues getting the filter to work consistently with promoted views. For any one row, it would only return a result if all string columns in that one row had non-null data. If at least one column was null, then that row would be omitted from the search results whether it was a valid match or not. It's probably an awkward filter configuration that I overlooked, but I haven't pursued it yet. 
  • JD_KeithJD_Keith Customer IT Monkey ✭
    Great solution @joivan_hedrick !  If we could get this working for promoted views, that would be the greatest.
  • joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
    Done! The newly-attached file in the initial post will now work with all promoted views, as well as OOB views, saved query views, and dashboard views. 
  • JD_KeithJD_Keith Customer IT Monkey ✭
    @joivan_hedrick You're the man!  Thank you so much!
  • Alistair_PleasantAlistair_Pleasant Customer IT Monkey ✭
    For some reason I'm having issues with the filter box not showing on IE but only when open within the My Work page! Works perfectly well in Chrome & Firefox!!!

    Has anyone else experienced this?
  • joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
    While testing in Portal v8 it seems that in IE, the page title loads without simultaneously loading the kendo grid. Almost definitely a timing issue, where IE simply loads the elements a few ms slower. One quick fix would be to move the observer.disconnect() line into the above if statement.

    I have a couple other v8 fixes in my list as well, like removing this filter from OData dashboards. I'll address this IE issue too when I make the update. 
  • Alistair_PleasantAlistair_Pleasant Customer IT Monkey ✭
    Thanks Joivan, do you have an idea as to when the update will be available?
  • joivan_hedrickjoivan_hedrick Cireson Consultant Advanced IT Monkey ✭✭✭
    Nay, I don't yet have a time frame for updating this quite yet. However, using the legacy version should work for you in the meantime. It loads on a ~tacky timer which works, but has a delay before appearing on the page. 
Sign In or Register to comment.