how to format the data inside the DataGridTemplateColumn in datagrid
- by prince23
hi,
this is my xaml code where i have 2 fields placed under one template column.
now i am getting the format the output like this so that i can specify the space betweeen these 2 columns
Color
red image1
green image2
green image2
white image6
so that output looks good.
How can i define space between them so that it looks like the above one
right now thw output is like this
color
Redimage1
greenimage2
greenimage2
whiteimage6
<sdk:DataGridTemplateColumn Header="Color" Width="80">
<sdk:DataGridTemplateColumn.CellTemplate>
<DataTemplate>
<StackPanel Loaded ="StackPanel_Loaded" Orientation="Horizontal" Background="Transparent">
<TextBlock Text="{Binding Color}" TextWrapping="NoWrap" HorizontalAlignment="Center" Foreground="Blue"></TextBlock>
<Image x:Name="imgTargetScore" Source ="{Binding ColorImage}" Width="20" Height="20" Stretch ="Fill"/>
</StackPanel>
</DataTemplate>
</sdk:DataGridTemplateColumn.CellTemplate>
</sdk:DataGridTemplateColumn>
loking forward for an solution
thanks in advance
prince