Click here to Skip to main content
15,886,693 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
This sample demonstrates how to enable Excel-style filtering on the WebDataGrid control. Excel-style filtering gives users the option to select the search condition from a checkbox list with distinct values for the column. You can choose a subset of the list items or all items. On touch devices, hit targets are rendered larger to enable touch interactions and the grid can take advantage of the flick gesture to quickly scroll its contents. Note: Filtering is disabled on the Address column.
.......
----------------------------------------------------------------------------------------
XML
<body>
    <form id="form1" runat="server">

 <div id="gridContainer" style="overflow:visible">
    <ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" DataSourceID="SqlDataSource1"
        Width="100%" Height="425px" DataKeyFields="proj_id">
        <Columns>

            <ig:BoundDataField DataFieldName="proj_id" Key="proj_id">
                <Header Text="proj_code" />
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="proj_code" Key="proj_code">
                <Header Text="proj_name" />
            </ig:BoundDataField>
            <ig:BoundDataField DataFieldName="proj_name" Key="proj_name">
                <Header Text="proj_desc" />
            </ig:BoundDataField>
        </Columns>
        <EditorProviders>
            <ig:TextBoxProvider ID="TextBoxProvider" />
        </EditorProviders>
       <Behaviors>
            <ig:Filtering Alignment="Top" Visibility="Visible" Enabled="true" FilterType="ExcelStyleFilter">
                <ColumnSettings>
                    <ig:ColumnFilteringSetting ColumnKey="proj_code" Enabled="true" />
                </ColumnSettings>
            </ig:Filtering>
        </Behaviors>

    </ig:WebDataGrid>
    </div>

      <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:vpay_dbConnectionString6 %>" OnInit="DataSourceInit"

             SelectCommand="SELECT [proj_id], [proj_code], [proj_name], [proj_desc] FROM [Project]"></asp:SqlDataSource>





    </form>
</body>
Posted
Comments
Maciej Los 22-Nov-14 9:12am    
Not a question!
If you would like to post tip/article, use this link
Member 10928697 24-Nov-14 0:43am    
http://www.infragistics.com/samples/aspnet/data-grid/filtering-excel-style
----------------------------------------------------------------------------
i have to use this link sir...my problem is check box was not checked

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900