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.
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.