Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • ´╗┐Hi,


                                    I am having trouble getting a list of selected rows on a tree list control. I have set the MultiSelectMode="Row". I understand you have a SelectedRows property but it isn't possible to binding to it from the XAML markup. Also I have tried using SelectedRowsSource and binding that to a SelectedRowsCollection object on the view model and that doesn't work either. Can you help ?


                                    Ajay

                                You must  log in  or  register  to leave comments

                                1 Solution

                                1

                                Hi Ajay,

                                Thank you for your inquiry. You can achieve this goal by binding to the TreeListView.SelectedRowsSource collection. Would you please clarify what does not work in your application when you use this approach?

                                I recommend you review the MVVM - How to bind the GridControl's selected rows to a property in a ViewModel example. It demonstrates how to bind GridControl's selected rows to a property in ViewModel. I have changed this example in accordance with your requirements. Please take a moment to review it in the attachment and let me know if you need further assistance.

                                Thanks

                                E3139.TreeListView.zip
                                • Ajay Prince 06.07.2012

                                  Hi Ivan,
                                  The solution you have attached works for me. Not sure why it didn't work before but this works brilliantly.

                                  Thanks,
                                  Ajay

                                You must  log in  or  register  to leave comments

                                If you need additional product information, write to us at info@devexpress.com or call us at +1 (818) 844-3383

                                FOLLOW US

                                DevExpress engineers feature-complete Presentation Controls, IDE Productivity Tools, Business Application Frameworks, and Reporting Systems for Visual Studio, along with high-performance HTML JS Mobile Frameworks for developers targeting iOS, Android and Windows Phone. Whether using WPF, Silverlight, ASP.NET, WinForms, HTML5 or Windows 8, DevExpress tools help you build and deliver your best in the shortest time possible.

                                Copyright © 1998-2014 Developer Express Inc.
                                All trademarks or registered trademarks are property of their respective owners