Programmatically add column definitions to a DataGrid in Wpf and MVVM? -


i want create pivot table in user interface.

pivot table in user interface

note please note number of columns not static.

and er diagram

er diagram

here main view model

public class mainviewmodel : viewmodelbase {      public observablecollection<colorviewmodel> colors { get; set; } } 

colorviewmodel class

public class colorviewmodel : viewmodelbase {     public public observablecollection<sizeqtyinformationviewmodel> sizeqtyinformationlist { get; set; } } 

sizeqtyinformationviewmodel class

public sizeqtyinformationviewmodel : viewmodelbase {     public size { get; set; }      public quantity { get; set; } } 

so now, wanna bind these datagrid , desired result.

i have idea don't know how implement this.

the idea is:

if can define column definitions programmatically, able bind columns well.

is there way implement above idea? or there way solve problem?


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -