Could someone help me figure out how to get jsGrid to load my data. I'm using the "pageLoading" option but it would appear the controller is not wanting to recognize my data. What am I missing?
[{"ROW_NUMBER":1,"data":"[{\"data\":[{\"STUDENTPIDM\":1,\"STUDENTID\":111,\"STUDENTNAME\":\"Presley, Elvis\",\"AIDYEAR\":\"2425\",\"CATEGORY\":\"Deceased\",\"CATEGORIES\":null,\"COMMENTS\":\"Wish he was still here\"},{\"STUDENTPIDM\":2,\"STUDENTID\":222,\"STUDENTNAME\":\"Monroe, Marilyn\",\"AIDYEAR\":\"2324\",\"CATEGORY\":\"Deceased\",\"CATEGORIES\":null,\"COMMENTS\":\"Really miss her.\"},{\"STUDENTPIDM\":3,\"STUDENTID\":333,\"STUDENTNAME\":\"Dean, James\",\"AIDYEAR\":\"2425\",\"CATEGORY\":\"Deceased\",\"CATEGORIES\":null,\"COMMENTS\":\"Cool Actor\"}],\"itemcount\":\"3\"}]"}]
controller: {
loadData: function (filter) {
return fetch("/internal/VD.XXXX")
.then(response => response.json())
.catch((error) => {
toastr["error"]("Something went wrong.", "Error");
});
Could someone help me figure out how to get jsGrid to load my data. I'm using the "pageLoading" option but it would appear the controller is not wanting to recognize my data. What am I missing?
Data
Controller Code:
Error:
Uncaught (in promise) TypeError: this.data is undefined