Programmatically add column definitions to a DataGrid in Wpf and MVVM? -
i want create pivot table
in user interface.
note please note number of columns not static.
and 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
Post a Comment