Click here to Skip to main content
15,899,313 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I want to Merge First's Column Rows in One.Please suggest me, How to Do it.

What I have tried:

<DataGrid Name="DG" ItemsSource="{Binding Persons}"  AutoGenerateColumns="False" Width="Auto" SelectionMode="Single" SelectedItem="{Binding SelectedEmployee}" SelectedIndex="{Binding SelectedIndex}"  CanUserSortColumns="True" >

                          <DataGrid.Columns>
                              <DataGridTemplateColumn  Width="50"  IsReadOnly="True">
                                  <DataGridTemplateColumn.CellTemplate>
                                      <DataTemplate>

                                      </DataTemplate>
                                  </DataGridTemplateColumn.CellTemplate>
                              </DataGridTemplateColumn>
                              <DataGridTextColumn  Foreground="Black" Width="140"    Header="FirstName"   Binding="{Binding FirstName, Mode=TwoWay}" IsReadOnly="False"/>
                              <DataGridTextColumn Foreground="Black" Width="140" Header="LastName"  Binding="{Binding LastName, Mode=TwoWay}" IsReadOnly="False"/>
                              <DataGridTextColumn Foreground="Black" Width="140" Header="Age"  Binding="{Binding Age, Mode=TwoWay}" IsReadOnly="False"/>
                              <DataGridTextColumn Foreground="Black" Width="140" Header="Contact"  Binding="{Binding Contact, Mode=TwoWay}" IsReadOnly="False"/>

                          </DataGrid.Columns>



                      </DataGrid>
Posted
Updated 13-Feb-17 20:21pm

1 solution

Hi,
Make a search for Multi binding on codeproject.
Best regards
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900