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 reply. I am very glad that the approach I have suggested was helpful for you. I have submitted a new Product Idea, for the ActiveItem property to return value, when selecting cell form a child band. I have sent your Product Idea directly to our product management team. Our product team chooses new Product Ideas for development based on popular feedback from our customer base. Infragistics continues to monitor application development for all of our products, so as trends appear in requested ideas, we can plan accordingly.
We value your input, and our philosophy is to enhance our toolset based on customer feedback. If your idea is chosen for development, you will be notified at that time. Your reference number for this Product Idea is PI12090113
If you would like to follow up on your Product Idea at a later point, you may contact Developer Support management via email. Please include the reference number of your Product Idea in the subject and body of your email message. You can reach Developer Support management through the following email address: dsmanager@infragistics.com
Thank you for your request.
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?
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.