2010-11-23 17 views
3

我有一個希望很簡單的問題。我想更改DataGrid的行組標題中的信息。 項目源是帶有GroupDescription的PagedDataCollection。我已經改變了這樣的樣式:如何更改DataGrid中的行組標題?

<Controls:DataGrid.RowGroupHeaderStyles> 
     <Style TargetType="Controls:DataGridRowGroupHeader"> 
      <Setter Property="PropertyNameVisibility" Value="Collapsed" /> 
      <Setter Property="Background" Value="#FFB4DC69" /> 
      <Setter Property="Foreground" Value="Black" /> 
      <Setter Property="SublevelIndent" Value="15" /> 
     </Style> 

     <Style TargetType="Controls:DataGridRowGroupHeader"> 
      <Setter Property="Background" Value="#44225566" /> 
     </Style> 
</Controls:ExtendedDataGrid.RowGroupHeaderStyles> 

但是帽子只改變了組名不可見。 組頭看起來像現在這樣:
第一頭:項目1:(170項)
第二頭:項目2:(10個項目)
...

我想現在要做的,是此時的標題是這樣的:
項目1:5的開發人員,測試人員5,1名項目經理
項目2:1髮色劑,1個測試儀,1個項目經理
...

但我不知道怎麼樣這可以做到。

你們有沒有做過類似的事情和/或知道我的問題的答案。

最好的問候,

TJ

回答