I want to build table from a data-model via DataBinding and not found how to do it. I have a data like this:
1.type CustomObj with slots:
- id
- a
- b
2. variable Content of type <List of CustomObj>
How to make a table like as below:
+--------------------+--------------------+--------------------+
|Identifier |a slot |b slot |
+--------------------+--------------------+--------------------+
|'id from first eleme|'a from first elemen|b from first elemen |
|t |t |t |
+--------------------+--------------------+--------------------+
|... |... |... |
+--------------------+--------------------+--------------------+
I read about FlowDocument but not found how to build flow document from List via DataBinding.
To achieve what you want, use a DataGrid.
Create a
ObservableCollection<CustomObj>and bind the DataGridsItemsSourceto this OC.Your DataGrid could look like: