Forum Replies Created

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • guidedbycthulhu
    Participant
    Post count: 4

    Fawzi came up with a solution to the issue. For posterity, I am going to post the solution in case someone else wants to know the solution.

    First, remove the Multibinding completely. It should now look something like this:
    <xcg:Column FieldName=”MultiValue” Title”EdgeCase” ReadOnly=”True”/>

    Now, in the DataCollectionViewSource, you will change the DataGridUnboundProperty to resemble this:
    <xcdg:DataGridItemProperty Name=”MultiValue” SortComparer=”{StaticResource MyCustomComparer}” QueryValue=”CodeBehind_QueryValue”/>

    The important part is the QueryValue, which will be a method in our codebehind. That method will look like the following:

    private void CodeBhind_QueryValue(object sender, Xceed.wpf.datagrid.DatagridItemPropertyQueryValueEventArgs e)
    {
    e.Value = “Your custom value”;
    }

    Bam, you can now sort on the Unbounded item with the custom SortComparer.

    Thanks Fawzi!

    guidedbycthulhu
    Participant
    Post count: 4

    I have created a sample project replicating the issue, and have sent it to the email you provided. I look forward to your input.

    guidedbycthulhu
    Participant
    Post count: 4

    Afternoon Fawzi,

    I have changed the DataGridItemProperty to DataGridUnboundItemProperty; it still supplies nulls to the SortComparer.

    I will attempt to make an example solution as soon as possible.

    If anyone has any suggestions in the meantime, please feel free to post…

Viewing 3 posts - 1 through 3 (of 3 total)