This question is locked. New answers and comments are not allowed.
Hi,
I'm using the RadGridView with AggregateFunctions. I have aggregated Sums of specific columns. Now I want to have the Text of one column to appear next to the aggregates. For this purpose I use the FirstFunction on the column I want to appear.
The problem is, I get the whole row bound to the column and it seems like the ToString() method of the DataContext of the row is called. But I want a specific property of the row bound to my column. Usually you want to bind the same property as the Column where the function is defined. I use a GridViewComboBoxColumn for this column.
Here is my code:
I need a DisplayProperty in the FirstFunction, so I can bind to "Currency" of the row.
Greets
I'm using the RadGridView with AggregateFunctions. I have aggregated Sums of specific columns. Now I want to have the Text of one column to appear next to the aggregates. For this purpose I use the FirstFunction on the column I want to appear.
The problem is, I get the whole row bound to the column and it seems like the ToString() method of the DataContext of the row is called. But I want a specific property of the row bound to my column. Usually you want to bind the same property as the Column where the function is defined. I use a GridViewComboBoxColumn for this column.
Here is my code:
<telerik:GridViewDataColumn Header="Preis" DataFormatString="N2" DataMemberBinding="{Binding Path=Price}" TextAlignment="Right" MinWidth="100"> <telerik:GridViewDataColumn.AggregateFunctions> <telerik:SumFunction ResultFormatString="{}{0:N2}" /> </telerik:GridViewDataColumn.AggregateFunctions></telerik:GridViewDataColumn><telerik:GridViewComboBoxColumn ItemsSource="{Binding Path=DataContext.Currencies, ElementName=root}" MinWidth="100" Header="Währung" DataMemberBinding="{Binding Path=Currency}"> <telerik:GridViewComboBoxColumn.AggregateFunctions> <telerik:FirstFunction /> </telerik:GridViewComboBoxColumn.AggregateFunctions></telerik:GridViewComboBoxColumn>I need a DisplayProperty in the FirstFunction, so I can bind to "Currency" of the row.
Greets