title: Why can other users not see data changes in a SignalR bound KendoUI Grid?
body: <p>I have a KendoUI Grid that uses SignalR in an ASP.NET Core 5 web application.  I am experiencing problems with it in that, other people within my company cannot see the updates when I change the data (create/update or destroy), they have to refresh their page which defeats the purpose of a SignalR implementation in this case.</p>
  <p>I investigated the reasons as to why this was, starting by simply adding a break point to the update method in my hub controller, just to make sure it was being hit and that the data was being passing in ok.  What I found was that, the method is not always called in the hub when an update is performed, I assume, please feel free to correct me, this is because a connection in SignalR has a lifespan (I think it's around 30/60 seconds?) and therefore is doesn't always make a new connection when the page is loaded.</p>
  <blockquote>
  <p>It's important to mention that, when I load my application I can see
  the hub connections, they seem to work correctly and I can see that
  they normalize when the page is loaded.  It's also important to say
  that no errors are reported and I have advanced error messages for SignalR turned on in my startup.cs.</p>
  </blockquote>
  <p>Additionally I started looking at how updates were being passed to clients.  As per the KendoUI Documentation, the crud operations in the hub controller pass the following:</p>
  <pre><code>await Clients.OthersInGroup(GetGroupName()).SendAsync(&quot;update&quot;, model);
  </code></pre>
  <p>According to the Microsoft documentation, <code>OthersInGroup</code> is all clients except the caller.  So, that seems to be fit for purpose.</p>
  <p>Here is my code for my SignalR bound grid.</p>
  <blockquote>
  <p>We are using the Azure SignalR service</p>
  </blockquote>
  <p><em><strong>hubs.js</strong></em></p>
  <pre><code>var opportunities_url = &quot;/opportunitiesHub&quot;;
  var opportunities_hub = new signalR.HubConnectionBuilder().withUrl(opportunities_url, {
      transport: signalR.HttpTransportType.LongPolling
  }).build();
  var opportunities_hub_start = opportunities_hub.start({
      json: true
  });
  </code></pre>
  <p><em><strong>startup.cs</strong></em></p>
  <pre><code>services.AddSignalR(options =&gt; { options.EnableDetailedErrors = true; })
      .AddAzureSignalR().AddJsonProtocol(options =&gt; {
      //Prevents SignalR converting all text to lower case.
          options.PayloadSerializerOptions.PropertyNamingPolicy = null;
      });
  
  app.UseAzureSignalR(endpoints =&gt;
  {
      endpoints.MapHub&lt;OpportunitiesHub&gt;(&quot;/opportunitiesHub&quot;);    
  });
  </code></pre>
  <p><em><strong>OpportunitiesHub.cs</strong></em></p>
  <pre><code>public async Task Update(Opportunity model)
  {
      try
      {
          await _opportunities.UpdateAsync(model);
          await Clients.OthersInGroup(GetGroupName()).SendAsync(&quot;update&quot;, model);
      }
      catch (Exception ex)
      {
          Console.WriteLine(ex.Message);
      }
  }
  </code></pre>
  <p><em><strong>Grid.js</strong></em></p>
  <pre><code>$('#grid_opportunities').kendoGrid({
      dataSource: {
          type: &quot;signalr&quot;,
          autoSync: true,
          transport: {
              parameterMap: parameters_opportunities_grid,
              signalr: {
                  promise: opportunities_hub_start,
                  hub: opportunities_hub,
                  server: {
                      read: &quot;read&quot;,
                      update: &quot;update&quot;,
                      create: &quot;create&quot;,
                      destroy: &quot;destroy&quot;
                  },
                  client: {
                      read: &quot;read&quot;,
                      update: &quot;update&quot;,
                      create: &quot;create&quot;,
                      destroy: &quot;destroy&quot;
                  }
              }
          },
          schema: {
              model: {
                  id: &quot;Id&quot;,
                  fields: {
                      Id: {
                          editable: false
                      }
                  }
              }
          }
      },
      autoBind: true,
      editable: &quot;incell&quot;,
      pageable: false,
      columns: [
          {
              field: &quot;Id&quot;,
              title: &quot;Ref&quot;,
              width: 60,
              template: &quot;RGH#=Id#&quot;
          },
          {
              field: &quot;Created_Date&quot;,
              format: &quot;{0:dd/MM/yyyy}&quot;,
              width: 100,
              title: &quot;Created&quot;                
          }            
      ]
  });
  </code></pre>
  <p>In summary:</p>
  <ul>
  <li>When I make changes to the grid on my PC, a colleague in Germany cannot see the change I just made.  However, if I make a change on my PC and have the grid open in a second window, I can see the update happen.</li>
  <li>I'm not convinced that the grid always makes a successful connection and thus is not subscribed to the hub to see any changes, which means the user has to refresh their screen to see anything happen.</li>
  </ul>
  <p>Can anyone help with this, I'm tearing my hair out and I can't seem to pin down if it's simply a configuration issue or my application has got a bug.</p>
  <p>Any help is appreciated</p>