I have a Hierarchical data structure that is a simple parent/child relationship. I need to be able to access the selected child record.
How do I access the selected child record of the xamDataGrid.
Seems like it should be a snap to do, but for the life of me I can't seem see how that would be done.
Just in case you need to obtain the record when selected, you can use the RecordActivated or the SelectedItemChanged events of the grid and check the record. There are couple of helpfull properties that can be used e.g.HasChildren, NestingDepth, ParentDataRecord etc. If you need to obtain all of the selected child records e.g. on a button click or any other action than you may consider using the SelectedItems.Records collection of the grid. It is possible to iterate through the records and check the same properties.
Let me know if you have any questions with this matter.
I am new to XML and have just started to use 2017.1 XamDataGrid and it appears to be very difficult to get around and writing code to do just about anything. For example, I have a 2-level hiearchical dataset, need to enable certain child records for editing if one of the field value of the child record has a value of true. I need to set this up during XamDataGrid initial loading. Can you please send me an example how this should be done? Thanks Steve
Never mind. I found this help doc https://www.infragistics.com/help/wpf/xamdatapresenter-iterate-through-the-records-collection. So I know how to iterate through records/child records now.
But I have a new question. How can I change both Parent/Child records' header back color, row highlight color, backgroud color etc. programmatically, i.e. in C# code?
.