Hi,
I have to create Datagrid columns on the fly using code.
is it possible to do the below template in Code Behind ?
<DataGridTemplateColumn><DataGridTemplateColumn.CellTemplate><DataTemplate><Border x:Name="brdBorder" Margin="1"><TextBlock Text ="{Binding Computer}" Margin ="1.1" x:Name="txtTextBlock"/></Border><DataTemplate.Triggers><DataTrigger Binding="{Binding Computer}" Value="UP"><Setter TargetName="brdBorder" Property="Background" Value="Green"/><Setter TargetName="txtTextBlock" Property="Foreground" Value="White"/></DataTrigger> </DataTemplate.Triggers></DataTemplate></DataGridTemplateColumn.CellTemplate></DataGridTemplateColumn>
Any help would really be appreciated.
thanks
exchposh