Answer the question
In order to leave comments, you need to log in
Need advice on implementing a DataGrid structure?
Hello. There is such a task, something like a directory. We hammer in the name of the device, company, model, serial number. But the device may have some other devices included in the kit (for example, a monoblock has a keyboard and a mouse) I can’t figure out how to add components to the device, how to connect it all? I am writing an application in C#WPF using the MVVM pattern, the problem is that I don't understand how I can bind to a table.
In theory, I understand how to do this, I thought to create two lists, more precisely one listList<parant_name>
for parents and one dictionaryDictionary<parent_id, List<child>>
. If I click on the add device button, then an entry occurs in the List; if I click on the button to add a component to the device, then the current parent id is taken and written to the Dictionary, but how can I display all this in the DataGrid? I don't understand how to implement it
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question