I need to do a customized search for SharePoint. It needs to search in all the columns and rows of the list without having to select the column, in other words it cannot have filter. I cannot edit the master page of the SharePoint, search field needs to be added in a Content box. Now, I did manage to search but it does not search the entire list since it has paging. I have tried naming the class, the webpart and event calling the list by ID. How can I make it search ALL the columns and rows and display the results.
I've read I can use CSOM, JSOM or REST to extract the items in the list and query them, but I have found this a bit complicated to implement in this case.
The code needs to be simplified and deploy-able across the entire SharePoint site. Any input is very appreciated.
Here is part of my code for the .click() of the button:
$("#btnSearch").click(function () {
var param = $("#tbSearchBox").val();
if (param != "") {
var collapsedGroups = $("td.ms-gb img[src*='/_layouts/images/plus.gif']:visible");
if (collapsedGroups.length > 0)
{
$("td.ms-gb img[src*='/_layouts/images/plus.gif']:visible").parent().click();
}//will expand the collapsed groups
searchResult = $("table.ms-listviewtable").find("td:contains('" + param + "')").parent();
allRows = $("table.ms-listviewtable").find("td").parent();
allRows.hide();
searchResult.show();
} //end of If
});//end #btnSearch