Simply change your query to add multiple columns. I think your example uses stored procedure to retrieve the value from the database so change the query in the stored procedure from
SELECT ROW_NUMBER() OVER(ORDER BY [CustomerID] ASC) AS RowNumber
,[CustomerID]
,[CompanyName]
,[ContactName]
,[City]
INTO #Results
FROM [Customers]
WHERE [ContactName] LIKE @SearchTerm + '%' OR @SearchTerm = ''
SELECT ROW_NUMBER() OVER
(
ORDER BY [CustomerID] ASC
)AS RowNumber
,[CustomerID]
,[CompanyName]
,[ContactName]
,[City]
INTO #Results
FROM [Customers]
WHERE [ContactName] LIKE @SearchTerm + '%' OR [CustomerID] LIKE @SearchTerm + '%' OR [City] LIKE @SearchTerm + '%' OR @SearchTerm = ''
and replace the following line in your jquery from
$(".ContactName").each(function () {
var searchPattern = new RegExp('(' + SearchTerm() + ')', 'ig');
$(this).html($(this).text().replace(searchPattern, "" + SearchTerm() + ""));
});
TO
$("#<%=gvCustomers.ClientID%> tr:has(td)").children().each(function () {
var cellText = $(this).text().toLowerCase();
if (cellText.indexOf(SearchTerm().toLowerCase()) >= 0)
{
var searchPattern = new RegExp('(' + SearchTerm() + ')', 'ig');
$(this).html($(this).text().replace(searchPattern, "" + SearchTerm() + ""));
}
});
Hope the above code changes help