1

剣道ガント チャートに行を動的に追加する必要があります (新しいタスクを追加するようなものです)。新しい行を dataSource に追加していますが、新しく追加した行が UI に反映されません。ガント チャートを更新しようとしましたが、うまくいきません。k-rebind の追加は機能しますが、k-rebind オプションを使用したくありません。

プランカー: http://plnkr.co/edit/D5TZlsrUS9XX2nV6WOFe?p=preview

function injectRow() {
    $scope.myGanttOptions = ganttServices.injectRow($scope.myGanttOptions);
    console.log($scope.myGanttOptions); //$scope.myGanttOptions is having the newly injected row, but it is not seen in the UI.

    //  refreshing the gantt chart does not inject the row.(even after trying it in timeout)
    $timeout(function() {
        $('#ganttID').getKendoGantt().dataSource.read();
        $('#ganttID').getKendoGantt().refresh();
    },100);
}
4

0 に答える 0