This example shows how jqGrid deals with paging, sorting and filtering with 1,000,000 rows of data. This is supported purely by Linq / LinqDataSource and does not require a single line of code!

We are using just a couple of lines of C# code in the special case when "All" is selected to cancel filtering (show all records). Check the C# tab for details, and the ASPX tab for complete setup.

jqGrid for ASP.NET supports search toolbar mode, where you can have a search toolbar on top of each column of the grid. To show the search toolbar, set the ToolBarSetting.ShowSearchToolBar property to true. You can exclude certain columns from appearing in the search options by setting the Searchable property of the respective column to false. Another property that plays role in searching is the SearchToolBarOperation property of each column, to specify how the grid treats searching. Default is Contains.
When a column is searchable, you can select how end-users will search it. This is controlled by the Column.SearchType property and current has four different options - TextBox, DropDown, AutoComplete and DatePicker
In addition to that, you can specify the values end-users will see in value:name pairs in the EditValues property of Columns - this is especially useful for EditType.DropDown. Here is an example

<trirand:JQGridColumn DataField="CompanyName" Searchable="true" SearchType="DropDown" SearchValues="1:FedEx;2:UPS;3:TNT" />

When searching is performed the grid triggers Searching / Searched event which you can use to customize this behaviour.
<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="default.aspx.cs" Inherits="JQSuiteASPNETExample.examples.loading_data.million_linqdatasource._default" %>
<%@ Register Assembly="Trirand.Web" TagPrefix="trirand" Namespace="Trirand.Web.UI.WebControls" %>

<!DOCTYPE html>
<html lang="en-us">
<head id="Head1" runat="server">
    <meta charset="utf-8">
    <title>jqGrid for ASP.NET WebForms - million rows of data</title>
    <!-- The jQuery UI theme that will be used by the grid -->
    <link rel="stylesheet" type="text/css" media="screen" href="" />
    <!-- The jQuery UI theme extension jqGrid needs -->
    <link rel="stylesheet" type="text/css" media="screen" href="/themes/ui.jqgrid.css" />
    <!-- The jQuery UI theme extension jqAutoComplete -->
    <link rel="stylesheet" type="text/css" media="screen" href="/themes/ui.jqautocomplete.css" />
    <!-- jQuery runtime minified -->
    <script src="/js/jquery-3.2.1.min.js" type="text/javascript"></script>
    <!-- The localization file we need, English in this case -->
    <script src="/js/trirand/i18n/grid.locale-en.js" type="text/javascript"></script>
    <!-- The jqGrid client-side javascript -->
    <script src="/js/trirand/jquery.jqGrid.min.js" type="text/javascript"></script>    
    <!-- The javascript for the grid search/edit advanced controls - datepicker and autocomplete -->
    <script src="/js/trirand/jquery.jqDatePicker.min.js" type="text/javascript"></script>
    <!-- The javascript for the autocomplete control -->
    <script src="/js/trirand/jquery.jqAutoComplete.min.js" type="text/javascript"></script>
    <style type="text/css">
        body, html { font-size: 80%; }            
        .ui-autocomplete-loading { background: white url('loading.gif') right center no-repeat; }        
    <form id="form1" runat="server">       
    <trirand:JQGrid runat="server" ID="JQGrid1" DataSourceID="LinqDataSource1" 
            Width="600px" Height="260px" onsearching="JQGrid1_Searching" >
                HeaderText="Order ID" 
                Width="50" />
                SearchValues="[All]:[All];10:> 10;20:> 20;30:> 30;50:> 50" 
                SearchToolBarOperation="IsGreaterThan" />    
                Width="200" />                      
        <ToolBarSettings ShowSearchToolBar="true"/>                                        
    <%-- This control will be used as a DatePicker search UI control in the grid toolbar--%>
    <%-- You can use JQDatePicker as a standalone control outside of a grid by setting DisplayMode="Standalone" --%>
        ShowOn="Focus" />  
    <%-- This control will be used as an AutoComplete search UI control in the grid toolbar--%>
    <%-- You can use JQAutoComplete as a standalone control outside of a grid by setting DisplayMode="Standalone" --%>
    <%--This control will be used as a DropDown search UI control in the grid toolbar--%>
        <asp:ListItem Text="[All]" Value="[All]"></asp:ListItem>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" 
        AutoPage="true" AutoSort="true"
        Select="new (OrderID, OrderDate, ShipName, CustomerID, Freight)"         
    <asp:SqlDataSource runat="server" ID="SqlDataSource1" 
        ConnectionString="<%$ ConnectionStrings:SQL2008_661086_trirandEntities %>"        
        SelectCommand="SELECT DISTINCT [ShipName] FROM [Orders]">
     <asp:SqlDataSource runat="server" ID="SqlDataSource2" 
        ConnectionString="<%$ ConnectionStrings:SQL2008_661086_trirandEntities %>"                 
        SelectCommand="SELECT DISTINCT [CustomerID] FROM [Orders]">
    <br />
    <br />
    <trirand:codetabs runat="server" id="tabs"></trirand:codetabs>
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

namespace JQSuiteASPNETExample.examples.loading_data.million_linqdatasource
    public partial class _default : System.Web.UI.Page
        protected void JQGrid1_Searching(object sender, Trirand.Web.UI.WebControls.JQGridSearchEventArgs e)
            if (e.SearchString == "[All]")
                e.Cancel = true;
Switch theme:

Theming is based on the very popular jQuery ThemeRoller standard. This is the same theming mechanism used by jQuery UI and is now a de-facto standard for jQuery based components. The benefits of using ThemeRoller are huge. We can offer a big set of ready to use themes created by professional designers, including Windows-like themes (Redmond), Apple-like theme (Cupertino), etc. In addition to that any jQuery UI controls on the same page will pick the same theme.

Last, but not least, you can always roll your own ThemeRoller theme, using the superb Theme Editor

To use a theme, simply reference 2 Css files in your Html <head> section - the ThemeRoller theme you wish to use, and the jqGrid own ThemeRoller Css file. For example (Redmond theme):

<link rel="stylesheet" type="text/css" media="screen" href="/themes/redmond/jquery-ui-1.8.2.custom.css" />
<link rel="stylesheet" type="text/css" media="screen" href="/themes/ui.jqgrid.css" />