Two Grids and SignalR problem

4 posts, 0 answers
  1. Jan Olsmar
    Jan Olsmar avatar
    35 posts
    Member since:
    Mar 2006

    Posted 14 Feb Link to this post

    I have tryed to get two (or more) grids to work with SignalR but failed.

    When I change a post it always add to one of the grids. (with no data, different values)

    I have different methods for update. eg update1 and updatex. I have also tryed different hubs.

    Is this a limitation or is there a way to get this to work.

    With one grid it works very nice.

    Thanks in advance.

     

     

  2. Jan Olsmar
    Jan Olsmar avatar
    35 posts
    Member since:
    Mar 2006

    Posted 15 Feb in reply to Jan Olsmar Link to this post

    As no one reads this forum I had to solve it myself.

    Just one promise and one hub per grid solved the issue.

     

  3. UI for ASP.NET MVC is VS 2017 Ready
  4. Jonathan
    Jonathan avatar
    11 posts
    Member since:
    Feb 2016

    Posted 11 Mar in reply to Jan Olsmar Link to this post

    Hello! Can you explain how you managed that I have also two control using Signalr in the save view but they seem to use the same promise even tho I've made two variables. When I check the Network traffic Only one start get's invoked everything is fin for the 1st control but the second one can only invoke read and does not receive Update, Create and Destroy Push. When I look at the network traffic it seems in start listening on the wrong hub.
  5. Jan Olsmar
    Jan Olsmar avatar
    35 posts
    Member since:
    Mar 2006

    Posted 12 Mar Link to this post

    First I define the hubs and the Connections.

    In both grids .Promise("hubStart") but different .Hub("aaahub") ---- .Hub("bbbhub")

    var medicinhub = $.connection.medicinHub;
             
            var aaahub = $.connection.aaaHub;
            var bbbhub = $.connection.bbbHub;
            var hubStart = $.connection.hub.start();     

Back to Top
UI for ASP.NET MVC is VS 2017 Ready