Ticket Q488771
Visible to All Users

GridView - Select all items when filter is applied selects only current page items

created 12 years ago

Hi,

I have a problem with GridView .SelectRows method. When filter is applied, the method selects only items on current page.

I have created a screencast for you.

thanks
Lubomir

Comments (3)

    The very same problem appears with GridView.ExpandAllDetailRows.

    Vasily (DevExpress Support) 12 years ago

      Hi Lubomir,
      My attempts to replicate the issue you are experiencing have been unsuccessful. I have created a sample, and it appears to work fine on my side (see a video). It looks like some other things are involved in this issue, which I have not taken into account. Would you please check how the attached project works? If it operates well, modify it to reproduce this issue and send the project to us.

        Hi Vasily,
        I see. I'm sorry, but I didn't change your sample, and I'm sending mine from previous questions. I changed this example to reproduce the problem. The video is also provided. The problem with selecting and expanding is presented there. The collapsing and unselecting works well.
        I see you are working with 12.2.8, but I'm not ready to switch yet, so mine example is facing 12.2.7. If the problem want appear on 12.2.8 I will push the update sooner, than planned.
        Thanks
        Lubomir

        Answers approved by DevExpress Support

        created 12 years ago (modified 12 years ago)

        Hello Lubomir,
        Thank you for providing your sample project. I have investigated it and found that the issue occurs because you are trying to select all filtered GridView rows when using a custom binding. The GridView sets selection using its records' key values. However, when a custom binding is used, the control has information only about records that are displayed on a current page. That is why it cannot select any rows on other pages.
        When filtering is not used, the GridView uses another mechanism to select all rows without saving key values, that is why it works correctly.
        As a workaround, I recommend you perform a custom grid's callback and get its filtered keys in the controller. Then you can pass these values to the view and add the grid's selected keys via the MVCxGridView.Selection.SelectRowByKey method. Please let me know if you need further assistance.

          Comments (2)

            Thanks for explanation…
            I understand the WA. I can see, that there is a a lot of things, that is not really working smoothly with advanced binding yet.
            Thanks
            Lubomir

            DevExpress Support Team 12 years ago

              The principle of the Custom Binding is that the grid loads data that will be displayed only on the current page. That is why some mechanisms do not work as with the standard binding. However, we are always trying to improve our products and will do so in the future. Should you have any questions, feel free to contact us at any time.

              Disclaimer: The information provided on DevExpress.com and affiliated web properties (including the DevExpress Support Center) is provided "as is" without warranty of any kind. Developer Express Inc disclaims all warranties, either express or implied, including the warranties of merchantability and fitness for a particular purpose. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.

              Confidential Information: Developer Express Inc does not wish to receive, will not act to procure, nor will it solicit, confidential or proprietary materials and information from you through the DevExpress Support Center or its web properties. Any and all materials or information divulged during chats, email communications, online discussions, Support Center tickets, or made available to Developer Express Inc in any manner will be deemed NOT to be confidential by Developer Express Inc. Please refer to the DevExpress.com Website Terms of Use for more information in this regard.