jQWidgets Forums
jQuery UI Widgets › Forums › Grid › dataAdapter not populating
This topic contains 1 reply, has 1 voice, and was last updated by AA5MC 8 years, 3 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
Hello,
I have the following json return string:[ { "Id": 69, "Acenders": "Ascender-2", "Sn": "5450", "PartDescription": "", "OpsEmail": "Stephen.white.2@aon.com", "DateCreated": "2017-02-14 10:45:12", "CallBack": "NA", "Completion": "NA", "ServiceRep": "", "OnSite": true, "Issue": "Broken Belt", "Resloutions": "", "TicketOpen": false, "IsOperational": true, "OpsId": "AH55260", "PartId": "Accumulator", "ErrorMessage": "", "IsError": false, "Creation": "2017-01-30 12:53:32" }, { "Id": 68, "Acenders": "Ascender-2", "Sn": "4920", "PartDescription": "", "OpsEmail": "Stephen.white.2@aon.com", "DateCreated": "2017-02-14 10:45:11", "CallBack": "NA", "Completion": "NA", "ServiceRep": "", "OnSite": false, "Issue": "Sensors", "Resloutions": "", "TicketOpen": false, "IsOperational": true, "OpsId": "AH55260", "PartId": "Accumulator", "ErrorMessage": "", "IsError": false, "Creation": "2017-01-30 12:54:09" }, { "Id": 67, "Acenders": "Ascender-2", "Sn": "4920", "PartDescription": "", "OpsEmail": "Stephen.white.2@aon.com", "DateCreated": "2017-02-14 10:45:10", "CallBack": "NA", "Completion": "NA", "ServiceRep": "", "OnSite": true, "Issue": "Broken Belt", "Resloutions": "", "TicketOpen": false, "IsOperational": false, "OpsId": "AH55260", "PartId": "Transport Collator", "ErrorMessage": "", "IsError": false, "Creation": "2017-01-30 12:55:09" }, { "Id": 66, "Acenders": "Ascender-2", "Sn": "4560", "PartDescription": "", "OpsEmail": "Stephen.white.2@aon.com", "DateCreated": "2017-02-14 10:45:10", "CallBack": "NA", "Completion": "NA", "ServiceRep": "", "OnSite": false, "Issue": "Broken Finger", "Resloutions": "", "TicketOpen": false, "IsOperational": true, "OpsId": "AH55260", "PartId": "Feeders", "ErrorMessage": "", "IsError": false, "Creation": "2017-01-30 12:55:36" }, { "Id": 65, "Acenders": "Ascender-2", "Sn": "4560", "PartDescription": "", "OpsEmail": "Stephen.white.2@aon.com", "DateCreated": "2017-02-14 10:45:09", "CallBack": "NA", "Completion": "NA", "ServiceRep": "", "OnSite": false, "Issue": "Motor", "Resloutions": "", "TicketOpen": false, "IsOperational": false, "OpsId": "AH55260", "PartId": "Collator", "ErrorMessage": "", "IsError": false, "Creation": "2017-01-30 12:55:59" } ]
However, the $.jqx.dataAdapter is not populating nor am I getting any errors or load events firing?
below is my code for the grid, I have used this grid many times with the same techniques and it always has worked this is a new version of the grid( just downloaded it today) my HTML is bootstrap UI so not sure if that’s my issue or not?var url ='http://localhost:63073/api/Inserter/GetAllTickets' var source = { datatype: "json", datafields: [ { name: 'Id', type: 'int' }, { name: 'Acenders', type: 'string' }, { name: 'Sn', type: 'string' }, { name: 'PartDescription', type: 'string' }, { name: 'OpsEmail', type: 'string' }, { name: 'DateCreated', type: 'string' }, { name: 'CallBack', type: 'string' }, { name: 'Completion', type: 'string' }, { name: 'ServiceRep', type: 'string' }, { name: 'OnSite', type: 'bool' }, { name: 'Issue', type: 'string' }, { name: 'Resloutions', type: 'string' }, { name: 'TicketOpen', type: 'bool' }, { name: 'IsOperational', type: 'bool' }, { name: 'OpsId', type: 'string' }, { name: 'PartId', type: 'string' }, { name: 'Creation', type: 'string' } ], id: 'Id', url: url }; var dataAdapter = new $.jqx.dataAdapter(source, { downloadComplete: function (data, status, xhr) { }, loadComplete: function (data) { }, loadError: function (xhr, status, error) { } }); $("#mcgrid").jqxGrid( { width: '100%', filterable: true, source: dataAdapter, sortable: true, altrows: true, enabletooltips: true, autoshowfiltericon: false, columnsresize: true, groupable: true, filtermode: 'excel', columns: [ { text: 'Acenders', datafield: 'Acenders', cellsalign: 'center', align: 'center' }, { text: 'Sn', datafield: 'Sn', cellsalign: 'center', align: 'center' }, { text: 'PartDescription', datafield: 'PartDescription', cellsalign: 'center', align: 'center' }, { text: 'OpsEmail', datafield: 'OpsEmail', cellsalign: 'center', align: 'center' }, { text: 'DateCreated', datafield: 'DateCreated', cellsalign: 'left', align: 'left' }, { text: 'CallBack', datafield: 'CallBack', cellsalign: 'left', align: 'left' }, { text: 'Completion', datafield: 'Completion', cellsalign: 'center', align: 'center' }, { text: 'ServiceRep', datafield: 'ServiceRep', cellsalign: 'center', align: 'center' }, { text: 'OnSite', datafield: 'OnSite', cellsalign: 'center', align: 'center' }, { text: 'Issue', datafield: 'Issue', cellsalign: 'left', align: 'left' }, { text: 'IsOperational', datafield: 'IsOperational', cellsalign: 'center', align: 'center' }, { text: 'OpsId', datafield: 'OpsId', cellsalign: 'center', align: 'center' }, { text: 'PartId', datafield: 'PartId', cellsalign: 'center', align: 'center' } ], });
Ran a trace and found I was still missing some components js files…
all fixed -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.