Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
110
WebDataGrid filter date ExcelStyleFilter
posted

I cannot filter on date-columns with an ExcelFilter. I used your sample that worked with the normal filter, but as soon as I change it to ExcelStyle, it does not work anymore.

I think that it might be a culture-problem. In the Netherlands we use dateformat dd-MM-yyyy which is being shown in the grid. If I try to filter, I see the dates in MM/dd/yyyy format. When I uncheck everything and check one date, nothing is being filtered. If I open the filter again, everything is been selected again. If I change the (ui)culture to en-US, the problem still exists.

I hope you can point me to the solution,

Danny Springer

This is the page, no code-behind.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="NorthwindSample.aspx.cs" Inherits="FilterGrid.NorthwindSample"  %>
 
<%@ Register assembly="Infragistics4.Web.v12.1, Version=12.1.20121.1005, Culture=neutral, PublicKeyToken=7dd5c3163f2cd0cb" namespace="Infragistics.Web.UI.GridControls" tagprefix="ig" %>
 
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
 
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title></title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <asp:ScriptManager ID="ScriptManager1" runat="server">
        </asp:ScriptManager>
        <ig:WebDataGrid ID="WebDataGrid1" runat="server" AutoGenerateColumns="False" 
            DataSourceID="SqlDataSource1" Height="350px" Width="400px">
            <Columns>
                <ig:BoundDataField DataFieldName="ShippedDate" Key="ShippedDate">
                    <Header Text="ShippedDate" />
                </ig:BoundDataField>
                <ig:BoundDataField DataFieldName="OrderID" Key="OrderID">
                    <Header Text="OrderID" />
                </ig:BoundDataField>
                <ig:BoundDataField DataFieldName="Subtotal" Key="Subtotal">
                    <Header Text="Subtotal" />
                </ig:BoundDataField>
            </Columns>
            <Behaviors>
                <ig:Filtering FilterType="ExcelStyleFilter">
                </ig:Filtering>
            </Behaviors>
        </ig:WebDataGrid>
        <asp:SqlDataSource ID="SqlDataSource1" runat="server" 
            ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>" 
            SelectCommand="SELECT [ShippedDate], [OrderID], Freight as [Subtotal] FROM Orders">
        </asp:SqlDataSource>
    
    </div>
    </form>
</body>
</html>
Parents Reply Children
No Data