I am using JQuery EasyUI's datagrid is a very basic implementation.
In short, one web service works, another doesn't but the code is basically identical and both web services are hosted on the same server and use CORS so we have no same origin issues. I really cannot see any visible difference between the code and their execution. One works, the other does not... I can only assume it is something to do with the server API response but the structure matches, the are both generated off the same site and same server... all very odd... I'm using .NET Web API 2 to output the JSON.
Here's the working version:
<table id="DGInProgress" class="easyui-datagrid" data-options="singleSelect:true,collapsible:true,url:'https://www.driverlive.co.uk/rest/api/PushMessage/GetPushDriverMessagesList?DeviceId=a99f8a977696bfb9&DateFrom=2014-10-27T00:00:00&DateTo=2015-11-11T00:00:00',method:'get'"> <thead> <tr> <th data-options="field:'MessageDated',width:80">Dated</th> <th data-options="field:'PushNotificationMessage',width:100">Message</th> </tr> </thead> </table>
Here's the code that doesn't
<table id="DGInProgress" class="easyui-datagrid" data-options="singleSelect:true,collapsible:true,url:'https://www.driverlive.co.uk/dispatch/api/BookingsInProgressLite/GetBookingsLite?dateTimeFrom=2014-01-01&dateTimeTo=2015-03-01&limit=100&json=true',method:'get'"> <thead> <tr> <th data-options="field:'BookingReference',width:80">BookingReference</th> </tr> </thead> </table>
As you can see, both follow the same markup and when I view the web service JSON it too follows the same structure.
Additionally Fiddler shows that the 'get' request was made and that the JSON was returned. So why will the grid show the data for the PushMessages API and not the Bookings API?...