I want to bind WPF DataGridTextColumn dynamically. I try as follows
<DataGrid ><DataGrid.Columns><DataGridTextColumn Binding="{Binding NAME}" ClipboardContentBinding="{x:Null}" Header="{StaticResource colName}" /></DataGrid.Columns></DataGrid>
when colName is null its given an exeption and I can't run the page. How can I assign a default value when colName is null?