Answer the question
In order to leave comments, you need to log in
How to change DataGrid column headers depending on the data?
Hello!
I use DataGrid in my project. The table consists of two columns that are bound to a SortedList. One column is tied to Key, the other to Value, respectively. Column names: byte and byte value.
There was a need to display in the same table either a SortedList or just one hex value, depending on what the methods of the Model class return.
That is, in the case of SortedList, the table displays byte and byte value. And in the case of returning just a hex value, displays this hex value and its decimal value. Therefore, the column headings should also change to hexadecimal and decimal.
How to implement it? It's probably possible to describe this using XAML...
Thanks in advance!
Answer the question
In order to leave comments, you need to log in
I didn’t fully understand what was needed, but it seems to me that you can get by with Data triggers or look towards other types of triggers
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question