Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
100
Multiple values in a column
posted

Hi, i'm trying to do something like this with XamDataGrid (2 or more values in one Column)

<DataGrid ItemSource="{Binding MyValues}">

<DataGrid.Columns>
 <DataGridTemplateColumn Header="Value A and B">
 <DataGridTemplateColumn.CellTemplate>
 <DataTemplate>
 <StackPanel Orientation="Horizontal">
 <TextBlock Text="{Binding ValueA}" />
 <TextBlock Text="{Binding ValueB}" />
 </StackPanel>
 </DataTemplate>
 </DataGridTemplateColumn.CellTemplate>
 </DataGridTemplateColumn>
</DataGrid>
But i don't know how?! I experimented with the CellValuePresenterStyle, but nothing worked for me.
Has anyone an Idea?