Current filter:
                                You should refresh the page.
                                Support Center
                                0
                                  • Hi

                                    I wonder if you can help me.

                                    I have an ASPxDataview which i am populating with a number of products, these product images and names are displayed in a number of columns and rows to create an online shop look. I have a LinkButton whose CommandArgument is bound to data from the datasource so that i can can detect which item has been clicked.

                                    This all works fine, and the correct command arguments are picked up on the LinkButton Item Command.

                                    The problem i have is:

                                    I have now introduced a filter to allow users to be able to filter down to their specific product of interest.
                                    I display a list of products in the ASPxDataView and i can select products using the LinkButton.

                                    But as soon as i filter the ASPxGridView using a PerformCallBack(filterstring), and then try to select a product, the incorrect command argument is received in the LinkButton_ItemCommand.


                                    If for example, i click the 2nd product in the dataview after applying the filter, i always receive the command argument for the item which was the 2nd product in the dataview before the filter was applied.

                                    Can you tell me why this is happening and also tell me how i can select the correct item from the dataview AFTER APPLYING A FILTER.

                                    I have seen some comments stating that the dataview does not support selection, but that using the LinkButton selection can be achieved. I have referred to https://www.devexpress.com/Support/Center/Example/Details/E132 which is similar to my code, apart from the fact that my code includes filtering whereas your example doesnt.

                                    This example does not show how the selection can be done after applying a filter. If you could provide an example of how to select the correct item from a dataview AFTER applying a filter that would be very helpful.

                                    Thank you

                                You must  log in  or  register  to leave comments

                                1 Solution

                                0

                                Hello Asad,

                                It seems that you encountered the issue described in the KA18583 KB article (ASPxGridView - A button inside DataItemTemplate does not raise the Click event after a callback has been sent to the grid (e.g., to update sorting, filtering, grouping, etc.)). Please review it for a solution.

                                You must  log in  or  register  to leave comments

                                To start a chat you should create a support ticket


                                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