Hello,
I have developped the structure for a hierarchical grid but I want to know which of the child element is selected. Looking at what element does my ActiveItem returns, it only returns the root element and when I choose any child it returns null... Is anyway to know the selected child?
Thank you
Thank you for your post. I have been looking into the behavior that you have describes and it is expected. The ActiveItem property of the XamGrid returns the data corresponding to the ActiveCell and if the active cell is in a child band it returns null. You can read detailed description of the ActiveItem property here in our documentation: http://help.infragistics.com/NetAdvantage/Silverlight/2011/1/CLR4.0/?page=InfragisticsSL5.Controls.Grids.XamGrid.v12.1~Infragistics.Controls.Grids.XamGrid~ActiveItem.html.
I have created a sample application for you, which demonstrates how you can add a property to the XamGrid, which allows you to track the data item of the current active row in both parent and child hierarchy. To do that I have created a class that derives from the XamGrid and added a CurrentActiveItem dependency property to it. You can bind property of your ViewModel, to CurrentActiveItem property with two way mode and this way your ViewModel property will be updated, when you click on a cell from parent or child hierarchy and also if you set your ViewModel property in code, its corresponding Row will be scrolled into view and will be selected.
Please let me know if you need any further assistance on the matter.
Sincerely,
Krasimir
Developer Support Engineer
Infragistics
www.infragistics.com/support
Thank you, your solution is good for me. Do you know if this behaviour will be integrated in future releases?