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
500
XamDataGrid SortComparer not working with data binding
posted

I'm using an older version of Infragistics controls (2011 Volume 2) and for some reason the DateComparer class I have created is not being triggered when I set the SortComparer for an unbound field. 

I'm setting the SortComparer in XAML like this:

                       

<igDP:UnboundField BindingPath="CreatedDate" Label="Creation Date" Width="140" Converter="{StaticResource DateTimeOffsetToEnvDateTimeFormatConverter}">

                      <igDP:Field.Settings>

                               <igDP:FieldSettings AllowEdit="False" LabelWidth="140" CellWidth="140" SortComparer="{StaticResource SortDateComparer}">

                               </igDP:FieldSettings>

                           </igDP:Field.Settings>

                       </igDP:UnboundField>

 

I have the DateComparer class referenced in my user control resources such as:

 

<UserControl.Resources>

 <basecommon:DateComparer x:Key="SortDateComparer"/>

 </UserControl.Resources>

 

Am I doing anything wrong?  I know the Comparer works as I have it working in another XamDataGrid where I'm creating the Field Layout manually, but I'm not sure why it's not being triggered here.

  • 138253
    Offline posted

    Hello,

     

    I am just checking the progress of this issue and was wondering if you managed to achieve your goal or if you need any further assistance on the matter. 

  • 138253
    Offline posted

    Hello,

     

    Thank you for your post. I have been looking into it and I created a sample project for you following your scenario and everything seems to work ok on my side. If the sample doesn’t satisfies all your needs feel free to modify it, so it reproduces your behavior and send it back to me for further investigation.

     

    Looking forward for your reply.

    SortComparer.zip