How do you dynamically assign a datagrid's headers in c#?
Consider the following XAML:
In the C# code, how would I define the headers that are blank?Code:<data:DataGrid x:Name="dataGrid" AutoGenerateColumns="False" Margin="1,1,1,1" > <data:DataGrid.Columns> <data:DataGridTextColumn Header="Substantive" Binding="{Binding Path=Substantive}" IsReadOnly="True" /> <data:DataGridTextColumn Header="" Binding="{Binding Path=Month[0]}" IsReadOnly="True" /> <data:DataGridTextColumn Header="" Binding="{Binding Path=Month[1]}" IsReadOnly="True" /> </data:DataGrid.Columns> </data:DataGrid>


Reply With Quote
Bookmarks