Best approach for SignalR or data push integration

I'm new to C# and .Net.

I want a realtime update of a Grid without having to poll the backend.

It seems that SignalR is a popular approach in the .Net world for pushing data to the client.

I couldn't find a SignalR adaptor example for sfDataManager. I would have thought that realtime updates would be a popular request.

Would the best approach be to create an ObservableCollection based on SignalR and pass it as the DataManagerRequest parameter into a custom adaptor's Read method?

As a feature request, it would be nice to see SF create an adaptor for SignalR. Perhaps I'm missing a better approach to achieving realtime/push updates to SF components. Any advice would be greatly appreciated.

Thanks,
S.

3 Replies

RN Rahul Narayanasamy Syncfusion Team December 10, 2020 03:46 AM UTC

Hi Stephen, 
 
Greetings from Syncfusion. 
 
We have validated your query and you want to bind the data using SignalR. We suggest you to refer the below documentation for the requested detail on SignalR.  


Adaptors:  
 
Based on your data service, we suggest you to use the available adaptors. Please refer the below adaptors documentation for your reference.  

 
If you want to handle the API request by yourself, then you can achieve your requirement by using Custom binding concept. Find the below documentation for your reference. 

Reference
 
Please let us know if you have any concerns. 
 
Regards, 
Rahul 



ST Stephen December 15, 2020 02:41 AM UTC

I'm a bit confused on why the sfGrid does not re-render when my List is updated by SignalR. The List itself is updating when I set a breakpoint, and then StateHasChanged() is firing. Shouldn't that cause a re-render and, as a result, shouldn't the grid now show my items? It shows "No Records to Display"  in the sfGrid.

EDIT: I mostly got it working by adapting the ObservableCollection example from the sfGrid demo code.  Thx.


RN Rahul Narayanasamy Syncfusion Team December 15, 2020 02:08 PM UTC

Hi Stephen, 

Query: EDIT: I mostly got it working by adapting the ObservableCollection example from the sfGrid demo code.  Thx. 

Thanks for the update. 

We are happy to hear that the you have found the solution by yourself. Please get back to us if you need further assistance. 

Regards, 
Rahul 


Loader.
Up arrow icon