Ticket Q461658
Visible to All Users

GridView - Custom Binding with sorting and editing

created 11 years ago

[DevExpress Support Team: CLONED FROM Q472009: GridView Custom Binding with DataTable]
hi support,
I would like to know how to be able to perform sorting and editing using the above MVC GridView binding as my project involves dynamic binding.

Comments (3)
AG AG
Armand Galagnara 11 years ago

    This is the sample I've made and implements the custom binding with DataTable and sorting, grouping and paging operations which are not working. Also, I'd like to know how to perform editing on this.

    DevExpress Support Team 11 years ago

      Hi,
      Thank you for sending us the sample project. We need some additional time to review it. We will update this thread once we have results to report.

      AG AG
      Armand Galagnara 11 years ago

        Thanks Kate, hoping to get the solution as soon as possible.

        Answers approved by DevExpress Support

        created 11 years ago (modified 11 years ago)

        Hello,
        The issue occurs because each item of the provided collection has a subitem that stores values. That is why the grid cannot obtain data source fields. I've modified the project so that the typed collection is in use now.
        In addition, please note that you call the ToList() method to obtain each row of the data source and use them further. If your datasource has a lot of records, this will cause performance issues and the whole purpose of custom binding mode will be lost.
        Regarding the editing, it isn't different from a normal mode: set the action that will handle updated data and then return the partial view.
        Attached is the modified project.

          Show previous comments (1)
          Anthony (DevExpress Support) 11 years ago

            In this case, I suggest that you do not use Custom Binding mode. Use the standard mode instead. I have modified the project accordingly.

            AG AG
            Armand Galagnara 11 years ago

              Thank you very much Antony. This is what I've been looking for.

              Anthony (DevExpress Support) 11 years ago

                You're welcome!

                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.