I have following logical data structure of manufacturing process:
Top of the structure - Collection of Periods (PeriodName, IndexNumber).
Period has collection of Stages. Stage (StageName, IndexNumber inside of a Period)
Each Stage has a collection of Steps.
Step object stores 3 technical indicators (simple integer numbers) and a collection ofMaterials. Every Step has same amount of Materials in collection. Some values can be empty.
Each Material has Weight value, Name, BunkerNumber value, WeighterLineNumber value and few flags - AllowToAdd, Keep, CorrectionTarget.
I need to represent that data in a following way:
Table with following columns:
Each column should present a single Step. 1st 3 rows shows technical indicators, next rows shows Material objects, presenting Weight as a main value and flags with symbols, separated visually from a main value.
Grid should have a hierarchical top header, showing Periods on top, Stages in a next line with names and index numbers and Steps in next line with index numbers.
Also grid should have custom row headers, showing technical indicators names for 1st 3 rows and MaterialName, BunkerNumber and WeighterLineNumber for Material rows (everything read-only)
Also, process visualisation is dynamic, so I need to indicate current step by changing column's background colour (including current Step header). And data can be edited by user in real time, so grid should be updated when user deletes or adds new Step, Stage or Period.
Everything should be packed in user control which updates when data is changed.
What is a best way to achieve that?
PROBLEMS TO SOLVE:
1)How can I dynamically create and bind templated columns with two-way binding to my ViewModel?
2)How to create dynamic hierarchical header to that grid with ability to add/delete columns? No user sorting ability needed.
3)Is DataGrid the best base control I can use for such task?