如何使用刷新方法清除kendo窗口数据?

时间:2015-06-21 19:13:10

标签: angularjs kendo-ui

我在kendo窗口模式中有表单和网格,我想每次用户打开模态窗口时刷新屏幕,我使用refresh()但它不起作用...任何suggetion将不胜感激....

到目前为止尝试过代码......

main.html中

<div kendo-window="viewAttestorkWin" options="attWinOptions" k-modal="true"></div>

main.js

$scope.openAttestorSearch = function(){
          $scope.viewAttestorkWin.refresh();
          attestorConfig.attestorModalWinConfig.title = 'Add Attestor(s)';
          $scope.viewAttestorkWin.setOptions(attestorConfig.attestorModalWinConfig);
          $scope.viewAttestorkWin.open().center();

        };

1 个答案:

答案 0 :(得分:1)

它现在应该可以正常使用您的代码,但我怀疑setOptions使它没有成功。您是否尝试在窗口打开后调用刷新方法?

$scope.openAttestorSearch = function(){
    attestorConfig.attestorModalWinConfig.title = 'Add Attestor(s)';
    $scope.viewAttestorkWin.setOptions(attestorConfig.attestorModalWinConfig);
    $scope.viewAttestorkWin.refresh().center().open();
};