Forums - C# Corner

Forum guidelines
Raghunath Pentela

Raghunath Pentela

  • 1.8k
  • 27
  • 341

WPF Datagrid + MVVM + Header Change by ViewModel

May 15 2019 4:46 AM
WPF Datagrid + MVVM + Header Change by ViewModel
with autogeneratecolumns true.
I have two table entities in a Dbcontext Model. Table2 contains all configuration of column for e.g Header Fieldname, Header Description, Color, Font e.t.c
I am populating table1 in wpf datagrid through viewmodel. I want to replace the header names with the header description of table2 through MVVM
(Default WPF Datagrid) 
SrNo Col1 Col2
FieldName Description
SrNo          Serial No
Col1           Name
Col2           Age 
My datagrid should be 
Serial No Col1 Col2
My table1 and table2 are dynamic and autogenerate columns must be true. 

Answers (10)