How can I bind column header of datagrid? RRS feed

  • Question

  • There is a datagrid in my project. I’d like to bind column header from database. Do you have any idea for binding column header of datagrid? Thanks.
    Thursday, April 9, 2009 6:52 PM


  • You can try something like this:


    <Style TargetType="dataprimi:DataGridColumnHeader" x:Key="BoundHeader">

    <Setter Property="ContentTemplate">



    <TextBlock Text="{Binding Name}"/>





    Gunjan [MSFT]

    Thursday, April 9, 2009 8:59 PM