Ticket T942785
Visible to All Users

DataGrid for Blazor - How to use the gRPC service with the CustomData property

created 4 years ago (modified 4 years ago)

Hello DevExpress,
Let me explain the problem in general.
Most modern software products have several UI client applications (Desktop, Web, Mobile). UI applications are consuming the same web services to get data.
Lets say client UI has to get from web service the list of orders. We could implement one "GetOrders" method in web service and use it from all types of UI client applications. How we are getting data from web service is not depend from your controls.
The problem appears when your controls are involved in data retrieval logic. That is happening for data grid and combobox in "server" or "virtual" mode. In some way (defined by you), the information about next portion of data has to be passed to web service, than at web service, that information has to be converted to queries to database and reverted back to UI client.
Lets check how "GetOrders" method could be implemented for desktop and web UI clients in this case:

  • Desktop. For WinForms xtraGrid and Combobox in "server" mode you provide only WCF or ODATA web services implementations. WCF is out of question as is not supported, ODATA - is too complicated just for read only operations.
  • Web. Grid and Combobox have "virtual" mode, where CustomData event together with DevExtreme.AspNet.Data package are providing a elegant way to pass DataSourceLoadOptions to web service, convert it using EF or XPO to database queries and revert back a result.

So, just to get a list of orders from web service, the same logic has to be implemented twice, using totally different approaches for different UI clients. That is too complicated to implement and support, especially in huge enterprise software.
We would like to have one web service method "GetOrders" which could be reused by any UI client. As for me, I like the way how it is implemented using DevExtreme.AspNet.Data package.
Now why gRPC:
- Much more faster.
- Due to code generation, much more developer friendly. No needs for external packages, like nswag to generate clients.
- Easy to share *.proto file between projects/solutions
- Is a part of .net. Recommended by Microsoft.
Suggestion: Provide a easy way to implement gRPC web service method, which could be used to get data for any your control (Desktop or Web) in "server/virtual" mode.
Hope I was able to explain problems we are facing in a clear way.
Regards, Konstantin

Answers approved by DevExpress Support

created 4 years ago

Hello Konstantin,

At the moment, we don't have any plans regarding gRPC services. We will discuss whether it is possible to support these services with our DataGrid's design in future releases. Thank you for sharing your ideas with me.

As for the workaround for binding DxDataGrid to the gRPC service, I tried to implement such a scenario, but found that there are several limitations. The main difficulty is a specific format of the LoadResult object, which should be returned as a reply. This object has a complex structure and it should be duplicated declaratively using the proto syntax. I attached a sample project where loading data, sorting, filtering, and paging work. However, the grouping functionality will not work properly.

Regards,
Vova

    Show previous comments (9)
    Vova (DevExpress Support) 4 years ago

      Thank you for your feedback, Alex.

      KB KB
      Konstantin Balashov 4 years ago

        Hello DevExpress,
        It will be great to get some your feedback or thoughts regarding my comment above.
        May be it is better to create distinct ticket regarding possibility to implement web service method, which could be used to get data for any your list controls (Desktop or Web) in "server/virtual" mode using gRPC?
        Thank you.

        Dennis Garavsky (DevExpress) 4 years ago

          @Konstantin: I've answered you separately: T990364: gRPC with DevExpress list controls.

          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.