title: WPF: How to split Listview columns into sub-columns
body: <p>I am new to WPF. I'm trying to make a <code>Listview</code> table. I want to split some of the columns. For example:</p>
  
  <pre><code>   parent column1      |        parent column2   
  column1.1 | column 1.2 | column2.1 | column 2.2 |column 2.3 
  </code></pre>
  
  <p>I've found a similar question here: <a href="https://stackoverflow.com/questions/313889/wpf-spilt-gridview-header-into-two-rows-where-the-bottom-row-is-seperated-into">WPF: Spilt GridView header into two rows where the bottom row is seperated into two colums</a> 
  but the answer there didn't work for me. I couldn't comment and ask for further explanation since I don't have enough reputation to comment. When I do the same thing, in my case, columns are showed okay but they act as one column. Child columns do not work. 
  Here is my code sample:</p>
  
  <pre><code>&lt;ListView Margin="20" Name="purchaseSummaryList" ItemsSource="{Binding purchaseSummaryCol, Mode=Default}"&gt; 
    &lt;ListView.View&gt;
      &lt;GridView&gt;
        &lt;GridView.Columns&gt;
          //single example that works fine
          &lt;GridViewColumn Header="ID" Width="100"  DisplayMemberBinding="{Binding id, Mode=Default}" /&gt; //single example that works
          //parent column that acts as one column
          &lt;GridViewColumn Width="300" DisplayMemberBinding="{Binding pay, Mode=Default}"&gt;
            &lt;GridViewColumnHeader&gt;
              &lt;Grid HorizontalAlignment="Center" VerticalAlignment="Center"&gt;
                &lt;Grid VerticalAlignment="Center" ShowGridLines="False" Width="300"&gt;
                  &lt;Grid.RowDefinitions&gt;
                    &lt;RowDefinition Height="*"/&gt;
                    &lt;RowDefinition Height="*"/&gt;
                  &lt;/Grid.RowDefinitions&gt;
                  &lt;TextBlock Grid.Row="0" HorizontalAlignment="Center" Text="PARENT"/&gt;
                  &lt;Grid Grid.Row="1"&gt;
                    &lt;Grid.ColumnDefinitions&gt;
                      &lt;ColumnDefinition Width="*"/&gt;
                      &lt;ColumnDefinition Width="*"/&gt;
                      &lt;ColumnDefinition Width="*"/&gt;
                    &lt;/Grid.ColumnDefinitions&gt;
                    &lt;TextBlock Grid.Column="0" HorizontalAlignment="Center" Padding="5" Text="Child1" /&gt;
                    &lt;TextBlock Grid.Column="1" HorizontalAlignment="Center" Padding="5" Text="Child2"/&gt;
                    &lt;TextBlock Grid.Column="2" HorizontalAlignment="Center" Padding="5" Text="Child3"/&gt;
                  &lt;/Grid&gt;
                &lt;/Grid&gt;
              &lt;/Grid&gt;
            &lt;/GridViewColumnHeader&gt;
          &lt;/GridViewColumn&gt;
        &lt;GridView.Columns&gt;
      &lt;GridView&gt;
    &lt;ListView.View&gt;
  &lt;ListView&gt;
  </code></pre>
  
  <p>I know that it's obvious that there is only one column which is parent one since I didn't bind anything to child columns. But the problem is, I can not. It doesn't allow me to use <code>DisplayMemberBinding</code> for child <code>TextBlock</code>. I also can not add new <code>GridViewColumn</code> inside <code>Grid</code>. I don't know how to model this.</p>
  
  <p>Can someone help me with this problem? I would appreciate a good WPF tutorial link too where can I study. Thanks.         </p>