We use cookies to give you the best experience on our website. If you continue to browse, then you agree to our privacy policy and cookie policy. (Last updated on: November 16, 2018).
Unfortunately, activation email could not send to your email. Please try again.
Syncfusion Feedback

Filter Date

Thread ID:

Created:

Updated:

Platform:

Replies:

34227 Sep 6,2005 05:22 PM UTC Sep 6,2005 10:33 PM UTC WinForms 3
loading
Tags: GridControl
Keyur Patel
Asked On September 6, 2005 05:22 PM UTC

I''ve been looking at your FilterBar sample, but I haven''t figured out how you filter portions of dates. Here is my problem. My grid has a column whose type is DateTime. The format of the cell is set to "dd-MMM-yyyy". Is there a way to highlight the month portion of the date on the grid, and filter it based on that? For example, if the current cell is "6-Sep-04", how do I filter all the data so that only "Sep" rows are shown? I want to set the RowFilter property of the current dataview to do this. The date format shown on the grid is different than the date format of the actual data. Is there a way to filter the data as shown on the grid?

Administrator [Syncfusion]
Replied On September 6, 2005 07:22 PM UTC

The GridDataBoundGrid uses a DataView.RowFilter property to handling the filtering that requires #''s around dates. Here is a forum thread that discusses this. http://www.syncfusion.com/Support/Forums/message.aspx?MessageID=29956

Keyur Patel
Replied On September 6, 2005 07:45 PM UTC

OK, but that doesn''t solve my problem. But it does put me on the right track. When I run your FilterBarGrid sample, and choose the "Orders" table, the "OrderDate" column shows up like this: 1996-07-04T00:00:00.0000000-04:00 But, when I click on the cell, it changes to this: 7/3/1996 How do you get this effect?

Administrator [Syncfusion]
Replied On September 6, 2005 10:33 PM UTC

There is code that tries to specify a date format in that table. gbcc["OrderDate"].StyleInfo.Format = "d"; gbcc["OrderDate"].StyleInfo.CellValueType = typeof(DateTime); But this formatting is not taking because the DataType of the DataColumn in the XML data is System.String which means the grid cannot treat the column as a DataTime column. Instead, it is just the string being displayed that is stored in teh XML data that is used to populate the DataTable in that example. If you have a DataTable with a DataColumn whose DataType is a DateTime type, then the above code should affect its display. Here is a little sample with the proper DateTime column. http://www.syncfusion.com/Support/user/uploads/GDBG_Filter_bad0ab58.zip

CONFIRMATION

This post will be permanently deleted. Are you sure you want to continue?

Sorry, An error occured while processing your request. Please try again later.

Warning Icon You are using an outdated version of Internet Explorer that may not display all features of this and other websites. Upgrade to Internet Explorer 8 or newer for a better experience.Close Icon

;