Hi,
There is a way to display in a custom summary the number of selected items in a datagrid?The summary has to change if the selected items changed.
Thks.
Hello,
Currently, there is no such functionality. I suppose you can use a IValueConverter and bind to the SelectedItems.Records collection of the XamDataGrid and create your own customer summary.
How can I use a IValueConverter to bind the SelectedItems.Records collection in a custom summary?
Create a class that implements IValueConverter interface and create a static resource object of that class. Then, use a binding expression, which targerts with path the SelectedItems collection of the XamDataGrid (which depending on your structure, you can get with a RelativeSource or Elementname) and then apply the converter (static resource) at the Converter property of the Binding expression.
Sorry I try, but i don't understand how to do this.
I'have created a class that implements IValueConverter.I'have a bind to the counter of the selected item. I'have attached the static class to the binding path.
But how can I use this in my Summary Calculator Class? Have you an example?
My Code
public static SelectedItemValueConverter selectedItemConverter = new SelectedItemValueConverter();
var bindCounter = new Binding { Path = new PropertyPath("SelectedItems.Records.Count"), ElementName = "datagrid", Converter = selectedItemConverter };
public override object EndCalculation(SummaryResult summaryResult){ ????????}
Ideas to solve the problem?
Sacha