[SOLVED] Filter One List on your Page when there are Multiple Lists Displayed

Jul 7, 2011 at 7:36 PM

Since no one was helpful enough to provide a solution on here other than "I figured it out myself, thanks anyways", I decided to provide my solution for this common issue.

Taking the initial code, make the following changes to the following line in the highlighted ways.  You will have to view the code on your page to identify the exact "ID=" for the table in which you wish to filter.

LINE 17:   $("table.ms-listviewtable tr.ms-viewheadertr").each(function()

LINE 17: $('table[id="{28181369-180C-4BF8-840A-XXXXXXXXXXXX}-{24F575A8-745A-4441-9C6D-XXXXXXXXXXXX}"] tr.ms-viewheadertr').each(function()
Jul 26, 2012 at 7:37 PM

Where did you find the ID info? I tried using the ID from the List= in the URL with no success...

Jul 26, 2012 at 9:49 PM
Edited Jul 26, 2012 at 10:11 PM


Jul 27, 2012 at 12:10 AM
I was trying to have the filter run only on one list. I notice he has the id="xxx"-"yyy" and i was wondering where he got the IDs from and if the dash is needed?

I tried using the List ID and the View ID and the combination of both with no luck so i'm hoping someone can clarify further on what can be used.

Jul 27, 2012 at 9:21 PM

The ids above don't look right to me - they shouldn't be GUIDs. You should use the Developer Tools or Firebug to see what the id is on the table.


Jul 27, 2012 at 9:39 PM
Cool..I'll try that. Thanks for the help!

On Friday, July 27, 2012, sympmarc wrote:

From: sympmarc

The ids above don't look right to me - they shouldn't be GUIDs. You should use the Developer Tools or Firebug to see what the id is on the table.


Read the full discussion online.

To add a post to this discussion, reply to this email (instantlistfilter@discussions.codeplex.com)

To start a new discussion for this project, email instantlistfilter@discussions.codeplex.com

You are receiving this email because you subscribed to this discussion on CodePlex. You can unsubscribe on CodePlex.com.

Please note: Images and attachments will be removed from emails. Any posts to this discussion will also be available online at CodePlex.com

Jan 9, 2014 at 9:00 AM

Does anybody knows where these IDs are?

I am using Firebug and IE developer tolos, however, my tables doesnt have any ID.

Thank you in advance,
Jan 9, 2014 at 4:02 PM

What are you trying to do?

Jan 10, 2014 at 8:11 AM

I have two ListViews and when I include the script, two filtering rows appears. What I need is to separate the filtering between the two listviews. I've tried to look for the list ID but I dont know how to get it.

Jan 10, 2014 at 6:52 PM
You can adapt the selector to do something like selecting only the first - or second - List View.

Something like this would probably work:
$("table.ms-listviewtable:eq(1) tr.ms-viewheadertr").each(function()
Jan 11, 2014 at 7:48 AM
Ups, it doesnt work. I've inserted two content editors. The first one:
$("table.ms-listviewtable:eq(0) tr.ms-viewheadertr").each(function()
and the second one:
$("table.ms-listviewtable:eq(1) tr.ms-viewheadertr").each(function()
A filtering row appears above each listView, however, the filters only applies to the second listview