Quantcast
Channel: VBForums - WPF, WCF, WF
Viewing all articles
Browse latest Browse all 256

WPF - XAML - XamDataGrid - How to sort by Date Field?

$
0
0
Code:

<Custom:XamDataGrid.FieldLayouts>
<Custom:FieldLayout Key="masterRow">
    <Custom:FieldLayout.SortedFields>
        <Custom:FieldSortDescription Direction="Ascending" FieldName="ClosingDate"/>
    </Custom:FieldLayout.SortedFields>
    ...

I'm sorting by some fields correctly, by doing this the user can simply click the Column header and the column is sorted. The problem appears with date fields, it's using the date as a string for sorting, like:

01/09/2013
02/02/2012
04/12/2013
05/01/2012
...

So, is there any way to use a formatted date value for sorting (like format "YYYYMMDD"), or maybe using a converter and applying it into XAML? What's the best solution for this problem?

Viewing all articles
Browse latest Browse all 256

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>