This is a migrated thread and some comments may be shown as answers.

Two Grids and SignalR problem

3 Answers 77 Views
Grid
This is a migrated thread and some comments may be shown as answers.
Jan Olsmar
Top achievements
Rank 1
Jan Olsmar asked on 14 Feb 2016, 05:54 PM

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.

 

 

3 Answers, 1 is accepted

Sort by
0
Jan Olsmar
Top achievements
Rank 1
answered on 15 Feb 2016, 02:45 PM

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

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

 

0
Jonathan
Top achievements
Rank 1
answered on 11 Mar 2016, 07:28 PM
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.
0
Jan Olsmar
Top achievements
Rank 1
answered on 12 Mar 2016, 11:26 AM

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();     

Tags
Grid
Asked by
Jan Olsmar
Top achievements
Rank 1
Answers by
Jan Olsmar
Top achievements
Rank 1
Jonathan
Top achievements
Rank 1
Share this question
or