c# - WPF Datagrid ItemsSource -
i have dynamic set of columns , when populate rows , know columnname of rows. possible do?
a list of columns:
columns[0] = "firstcol";
columns[12] = "anothercol";
and list of rows.
first row
rows[0][0] = "item";
rows[0][12] = "item";
second row
rows[1][0] = "item";
rows[1][12] = "item";
i need populate datagrid. can done, dictionary or something, not know columns...
if can manage create structure, - row - column header - cell data
also expose list of column control (maybe bind it) on update of dynamically create columns , attach cell template, cell edit template (data templates, specify binding source item , paths). way dynamic columns added , binding established changes in rows or data updated between 'presenter' , 'view' (wpf datagrid control)
Comments
Post a Comment