DataGridColumn SortMemberPath on MultiBinding DataGridColumn SortMemberPath on MultiBinding wpf wpf

DataGridColumn SortMemberPath on MultiBinding


SortMemberPath is expecting the name of a property (e.g. "TotalDollars") not an individual computed row value. Think of it like the header, you set it once for the whole column. Your converter would be returning a number like 15 where SortMemberPath wants a binding path string.

Two options that come to mind:

  1. Provide a computed property on your backing object (e.g. "AveragePrice") and bind to that. No converter or sort member path necessary.

    public double AveragePrice{    get { return TotalDollars / NumberToDivideBy; }}
  2. Specify an OnSorting event handler like in this question.

Hope it helps. :)