Current filter:
                                You should refresh the page.
                                Support Center

                                How to filter selected / unselected ASPxGridView's DataRows


                                The example demonstrate how to filter ASPxGridView's DataRows based on the Selection state. The outside ASPxComboBox editor performs a custom ASPxGridView callback and determines the filtering mode. ASPxGridView's FilterExpression is combined via the InOperator / GroupOperator objects - special types for data filtering.

                                See Also:
                                DevExpress.Data.Filtering Namespace

                                You must  log in  or  register  to leave comments
                                Select file
                                • Default.aspx
                                • Default.aspx.cs
                                Select language
                                • C#
                                • VB.NET
                                Select version
                                • v2013 vol 1.4 - v2013 vol 2.9
                                • v2010 vol 2.6 - v2012 vol 2.16
                                <%@ Page Language="C#" AutoEventWireup="true"  CodeFile="Default.aspx.cs" Inherits="_Default" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxEditors.v10.2, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxEditors" TagPrefix="dx" %>
                                <%@ Register Assembly="DevExpress.Web.ASPxGridView.v10.2, Version=, Culture=neutral, PublicKeyToken=b88d1754d700e49a"
                                    Namespace="DevExpress.Web.ASPxGridView" TagPrefix="dx" %>
                                <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "">
                                <html xmlns="">
                                <head runat="server">
                                    <script type="text/javascript">
                                        function OnSelectedIndexChanged(s, e) {
                                    <form id="mainForm" runat="server">
                                        <dx:ASPxComboBox ID="cmbFilterMode" runat="server" ValueType="System.String" SelectedIndex="0">
                                                <dx:ListEditItem Text="All" Value="All" />
                                                <dx:ListEditItem Text="Selected" Value="Selected" />
                                                <dx:ListEditItem Text="UnSelected" Value="UnSelected" />
                                            <ClientSideEvents SelectedIndexChanged="OnSelectedIndexChanged" />
                                        <dx:ASPxGridView ID="grid" runat="server" AutoGenerateColumns="False" ClientInstanceName="grid"
                                            DataSourceID="gridDataSource" KeyFieldName="ProductID" 
                                                <dx:GridViewCommandColumn ShowSelectCheckbox="True" VisibleIndex="0">
                                                <dx:GridViewDataTextColumn FieldName="ProductID" ReadOnly="True" 
                                                    <EditFormSettings Visible="False" />
                                                <dx:GridViewDataTextColumn FieldName="ProductName" VisibleIndex="1">
                                                <dx:GridViewDataTextColumn FieldName="SupplierID" VisibleIndex="2">
                                                <dx:GridViewDataTextColumn FieldName="CategoryID" VisibleIndex="3">
                                    <asp:AccessDataSource ID="gridDataSource" runat="server" 
                                        SelectCommand="SELECT [ProductID], [ProductName], [SupplierID], [CategoryID] FROM [Products]"></asp:AccessDataSource>

                                To start a chat you should create a support ticket

                                If you need additional product information, write to us at or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners