我在我的MVC项目上使用Kendo Window.
这是我从View中启动对象的方式
@(Html.Kendo().Window()
.Name("window")
.Content("loading page..")
.Iframe(true)
.Draggable()
.Visible(false)
.Height(200)
.Width(400)
.Modal(true)
)
Run Code Online (Sandbox Code Playgroud)
这就是我使用javaScript调用窗口的方式,其中_url是动态的
$('#window')
.data("kendoWindow")
.title("Add new category")
.refresh({
url: _url
})
.center()
.open();
Run Code Online (Sandbox Code Playgroud)
我的问题是,每当我第二次打开窗口时,它仍会显示先前的内容,直到它完成加载当前内容.
我试图先使用以下内容隐藏内容:
$('#window')
.kendoWindow({
visible: false
})
.data("kendoWindow")
.title("Add new category")
.refresh({
url: _url
})
.center()
.open();
Run Code Online (Sandbox Code Playgroud)
但是当我试图关闭它时,对象似乎被破坏了.
我已经在我在VS2015社区制作的项目中应用了Gulp.但是当我使用Task Runner Explorer时,会出现一个对话框,说" 调用目标已抛出异常. "我尝试在"配置外部Web工具"中执行(PATH)操作,但它没有帮助所有.
NPM安装正在运行,Gulp正在正常执行.
我正在使用以下版本
此外,当我运行项目并打开任务运行程序资源管理器时,我有以下例外:
An exception was encountered while constructing the content of this frame. This information is also logged in "C:\Users\marvin\AppData\Roaming\Microsoft\VisualStudio\14.0\ActivityLog.xml".
Exception details:
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.VisualStudio.TaskRunnerExplorer.TaskRunnerUserControl.InitializeControl(Object sender, EventArgs e)
at System.Windows.FrameworkElement.RaiseInitialized(EventPrivateKey key, EventArgs e)
at System.Windows.FrameworkElement.OnInitialized(EventArgs e)
at System.Windows.FrameworkElement.TryFireInitialized()
at System.Windows.FrameworkElement.EndInit()
at MS.Internal.Xaml.Runtime.ClrObjectRuntime.InitializationGuard(XamlType xamlType, Object …Run Code Online (Sandbox Code Playgroud) 我有这个函数来捕获剑道树视图的拖动结束事件
function onDragEnd(e) {
console.log("Drag end", e.sourceNode, e.dropPosition, e.sourceNode);
}
Run Code Online (Sandbox Code Playgroud)
这将显示整个节点数据,例如
<li role="treeitem" class="k-item k-last" data-uid="[some guid]">
<div class="k-bot">
<span class="k-in">[node text]</span>
</div>
</li>
Run Code Online (Sandbox Code Playgroud)
还有这个函数来获取节点的文本.
var text = this.text(e.sourceNode);
Run Code Online (Sandbox Code Playgroud)
我希望有类似的东西
var id = this.id(e.sourceNode);
Run Code Online (Sandbox Code Playgroud)
会工作,但它没有,