大佬教程收集整理的这篇文章主要介绍了在 Kendo-UI 向导 ASP.NET Core 中,如何通过单击从服务器获取数据?,大佬教程大佬觉得挺不错的,现在分享给大家,也给大家做个参考。
如何向我的 razor 页面方法提交异步/AJAX 调用或在向导的步骤中进行自定义验证?
例如:我想根据上一步输入的内容填充每个步骤中的数据。我查看了示例,但它们似乎没有显示此类用例。
从 documentation samples 中,显示了事件,但不清楚如何将步骤的特定完成(单击下一步)绑定到特定事件函数(以标签助手格式)。
.Events(events =>
{
events.Activate("onActivate");
events.Error("onError");
events.Done("onDone");
events.SELEct("onSELEct");
events.reset("onreset");
events.ContentLoad("onContentLoad");
events.FormValIDateFailed("onFormValIDateFailed");
})
使用标签助手并试图找出如何绑定到步骤的事件时的屏幕截图:
@H_675_15@
事件与向导的步骤无关 - 它们处于向导级别:
<kendo-wizard name="wizard" on-activate="onActivate" on-SELEct="onSELEct">
<wizard-steps>
<wizard-step title="Initial step">
<wizard-step-content>
<h1>Initial step content</h1>
</wizard-step-content>
</wizard-step>
<wizard-step title="Second step">
<wizard-step-content>
<h1>Second step content</h1>
</wizard-step-content>
</wizard-step>
<wizard-step title="Final step">
<wizard-step-content>
<h1>Final step content</h1>
</wizard-step-content>
</wizard-step>
</wizard-steps>
</kendo-wizard>
<script>
function onActivate(E) {
console.log("Activated: " + e.step.options.label);
switch (e.step.options.label) {
case 'step 1':
//do what you need to here
break;
}
case 'step 2':
//do step 2 stuff here
$.ajax({ whatever });
break;
default:
}
}
function onSELEct(E) {
console.log("SELEcted: " + e.step.options.label);
}
然后,在事件处理函数中 - 您可以根据触发事件的步骤来确定您想要做什么 - 使用 e.step.options.label(或那里的其他属性)。从位于 https://demos.telerik.com/aspnet-core/wizard/events 的示例中,它们输出触发每个事件的步骤的标题。
以上是大佬教程为你收集整理的在 Kendo-UI 向导 ASP.NET Core 中,如何通过单击从服务器获取数据?全部内容,希望文章能够帮你解决在 Kendo-UI 向导 ASP.NET Core 中,如何通过单击从服务器获取数据?所遇到的程序开发问题。
如果觉得大佬教程网站内容还不错,欢迎将大佬教程推荐给程序员好友。
本图文内容来源于网友网络收集整理提供,作为学习参考使用,版权属于原作者。
如您有任何意见或建议可联系处理。小编QQ:384754419,请注明来意。