i evaluate the Syncfusion WPF Controls for our Company. We are very interessted in the GridTreeControl but i have many Problems to get the GridTreeControl work for me. The Samples are always works with Behaviours and much C# Code instead of XAML and the Documentation is not really meaningful =(
So back to Topic: I will make a simple DataBinding in a CellTemplate but no chance ....
<Window x:Class="Syncfusion.TestClient.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:vm="clr-namespace:Syncfusion.TestClient.ViewModel"
xmlns:syncfusion="clr-namespace:Syncfusion.Windows.Controls.Grid;assembly=Syncfusion.Grid.Wpf"
Title="MainWindow"
Height="350"
Width="1173">
<Window.DataContext>
<vm:MainWindowViewModel />
</Window.DataContext>
<Window.Resources>
<DataTemplate x:Key="sliderTemplate">
<StackPanel Orientation="Horizontal">
<TextBlock FontWeight="Bold"
Text="{Binding CellBoundValue}" />
<CheckBox IsChecked="{Binding CellValue2.IsAggregationValue}" />
<TextBlock Text="{Binding CellValue.IsAggregationValue}" />
</StackPanel>
</DataTemplate>
</Window.Resources>
<Grid>
<Grid.ColumnDefinitions>
<ColumnDefinition Width="55*" />
<ColumnDefinition Width="9*" />
</Grid.ColumnDefinitions>
<syncfusion:GridTreeControl x:Name="treeGrid"
ExpandStateAtStartUp="AllNodesExpanded"
ReadOnly="True"
ItemsSource="{Binding TreeDataViewModels}"
ChildPropertyName="SubTreeDataItems"
ExpandGlyphType="PlusMinusLines"
UpdateMode="PropertyChanged"
Margin="10">
<syncfusion:GridTreeControl.Columns>
<syncfusion:GridTreeColumn Width="150"
PercentWidth="0.5"
MappingName="Description">
</syncfusion:GridTreeColumn>
<syncfusion:GridTreeColumn Width="110"
PercentWidth="0.5"
MappingName="Quantity" />
<syncfusion:GridTreeColumn Width="110"
PercentWidth="0.5"
MappingName="Unit" />
<syncfusion:GridTreeColumn Width="120"
PercentWidth="0.5"
MappingName="Price" />
<syncfusion:GridTreeColumn MappingName="Price">
<syncfusion:GridTreeColumn.StyleInfo>
<syncfusion:GridDataStyleInfo CellType="DataBoundTemplate"
CellEditTemplate="{StaticResource sliderTemplate}"
CellItemTemplate="{StaticResource sliderTemplate}"/>
</syncfusion:GridTreeColumn.StyleInfo>
</syncfusion:GridTreeColumn>
<syncfusion:GridTreeColumn Width="120"
PercentWidth="0.5"
MappingName="AggregatedPrice" />
<syncfusion:GridTreeColumn Width="120"
PercentWidth="0.5"
MappingName="Currency" />
<syncfusion:GridTreeUnboundColumn Expression="Quantity*Price"
HeaderText="Grand Total"
MappingName="GrandTotal"
PercentWidth="2">
<syncfusion:GridTreeUnboundColumn.StyleInfo>
<syncfusion:GridStyleInfo HorizontalAlignment="Right"
CellType="CurrencyEdit" />
</syncfusion:GridTreeUnboundColumn.StyleInfo>
</syncfusion:GridTreeUnboundColumn>
</syncfusion:GridTreeControl.Columns>
</syncfusion:GridTreeControl>
</Grid>
</Window>
<CheckBox IsChecked="{Binding ModelStyle.CellValue2.IsAggregationValue}" /> (like the ToolTipSample with the Cars)