Filtering with localized datetime columns throws error

17 replies. Last post: October 26, 2009 4:22 AM by Handy Surya
Tags :
  • New Discussion
  • New Question
  • New Product Feedback

I'm using the latest Webgrid/WebUI version and noticed an error on filtering columns with localized datetime columns (when I apply the filter - flypostback). The WebgridRow:


iswebgrid:WebGridColumn DataFormatString="d" DataType="System.DateTime" Caption="Creation date" DataMember="dtCreate" EditType="NoEdit" Name="dtCreate" FilterEditType="CalendarCombo" Width="70px" Visible="True"


This bug must have been introduced in .215 I think, it worked until recently.

The error stack is:
String was not recognized as a valid DateTime.
[FormatException: String was not recognized as a valid DateTime.]
   System.DateTimeParse.Parse(String s, DateTimeFormatInfo dtfi, DateTimeStyles styles) 4582898
   System.Data.ConstNode..ctor(DataTable table, ValueType type, Object constant, Boolean fParseQuotes) 557
   System.Data.ConstNode..ctor(DataTable table, ValueType type, Object constant) 14
   System.Data.ExpressionParser.Parse() 1032
   System.Data.DataExpression..ctor(DataTable table, String expression, Type type) 154
   System.Data.DataView.set_RowFilter(String value) 188
   ISNet.WebUI.WebGrid.DataBinding.??(WebGrid grid, WebGridTable table, DataView dataSource) 3029
   ISNet.WebUI.WebGrid.DataBinding. (DataView dataSource, String dataMember, String request) 688
   ISNet.WebUI.ISNetControl.ControlRequestHandler(Object sender, EventArgs e) 426

[Exception: String was not recognized as a valid DateTime.]
   ISNet.WebUI.ISNetControl.ControlRequestHandler(Object sender, EventArgs e) 789
   System.EventHandler.Invoke(Object sender, EventArgs e) 0
   System.Web.UI.Control.OnPreRender(EventArgs e) 11022094
   System.Web.UI.Control.PreRenderRecursiveInternal() 108
   System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) 3394

All times are GMT -5. The time now is 9:11 AM.
Previous Next