WPF DataGrid RowHeader databinding

前端 未结 6 2069
孤城傲影
孤城傲影 2020-12-05 13:17

I have a DataGrid, bound to a DataTable. I want to display text in the RowHeader, to achieve something like this:

         Col0      Col1      Col2      Col3         


        
6条回答
  •  一向
    一向 (楼主)
    2020-12-05 13:52

    You were almost there just change the AncestorType to DataGridRow instead of DataGrid then the row headers will be different for each row e.g.

提交回复
热议问题