0

I am sporadically seeing my grid not show any rows when in fact there are rows bound to the grid. Does anyone see if my usage pattern is incorrect when integrating angular? Thanks!

EDIT - It also appears the strange behavior only occurs when leaving the page and coming back to the page for a full refresh.

$scope.init = function () {
    $scope.loading.busy.right = consigneeService.api.getActivity(session.consignee.id()).then(function (result) {
        $scope.details = result;
        $scope.gridOptions.dataSource.read();
    });
};

$scope.gridOptions = {
    dataSource: new kendo.data.DataSource({
        transport: {
            read: function (options) {
                options.success($scope.details);
            }
        }
    }),
    sortable: {
        allowUnsort: false
    },
    autoBind: false,
    columns: [
        { field: 'activityDate', title: 'Activity Date', width: '150px', template: "{{ dataItem.activityDate | cmsUTCToLocal : 'short' }}" },
        { field: 'activityDetails', title: 'Activity Details', width: '300px;' },
        { field: 'createUserId', title: "Created By", width: "125px" }
    ]
};
Marco
  • 2,453
  • 3
  • 25
  • 35
  • Is this the full definition of your datasource? You should've either specified a 'url' attribute or a 'data' attribute on the datasource: http://docs.telerik.com/kendo-ui/api/javascript/data/datasource#methods-read – sma Sep 15 '14 at 13:53
  • setting the data to an array on the scope does not seems to work (at least for me). – Marco Sep 15 '14 at 14:00
  • Is your grid information actually coming from an array or are you retrieving it from a remote source (like a REST endpoint)? – sma Sep 15 '14 at 14:01
  • the consigneeService returns the data which is reading from a REST endpoint. – Marco Sep 15 '14 at 14:03

0 Answers0