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>
Hello vernebe,
Thank you for contacting us!
Could you please try to set EnableScriptGlobalization property of the ScriptManager to true, like:
Looking forward to hearing from you.
Hi Zdravko,
I tried the EnbleScriptGlobalization, the effect of it is that the date in the filter appears as dd-MM-yyyy, but filtering still does not work. Any other ideas?
Regards,
The EnableScriptGlobalization solved the problem with the US-format in the filter, but it did not solve the not-working filter. (I also set EnableAjax to false and added at DataKeyField).
Any other options?
Hello,
Could you please explain me what do you mean by saying that the filter is not working. I am sending you a sample that is demonstrating how to use ExcelStyleFilter, it will be highly appreciated if you make the necessary changes in order to reproduce the issue and send it back to me.
I published the application at http://poc.verne.nu/filtergrid. I copied your sample and used that , nothing changed but the db-connectionstring. In Visual Studio I saw the following error as soon as I try to filter:
Exception was thrown at line 4150, column 69 in http://localhost:55974/ScriptResource.axd?d=4trK1hriIN295G-07XClGPcKfXvFrANGuPIKwUdk2TTQ9Jj-DCuN8Sz1utdF2-SEOSzs31hERNwMC9xAIvetOhqDoSNrSqhaY1hdxLASpWcL0s1HAos2ghx5Z8PoaDfBMYCOVi7Q9yGueif0nLskdejf_txpkWKSG84MElP5RgM-QkQXPXTt5u31KyTPhiKU0&t=ca758f30x800a139e - JavaScript runtime error: Sys.InvalidOperationException: Handler was not added through the Sys.UI.DomEvent.addHandler method.
I don't see how to attach the project to this message, but if you tell me where I can do that, I'll be happy to send it to you.
I also found out that the problem arises with IE11 anc Chrome. Firefox works well. Maybe this leads you to a solution.
Danny
I am just following up to see if you had try the fix already.