我是 Telerik UI 的新手。當我想在 asp.net razor 頁面中自定義劍道形式時。但我要重命名按鈕名稱。但我找不到任何按鈕欄位。我點擊此鏈接 [Telerik Form][1]。我編輯這個表格。
這是我的代碼
<div class="card dataForm mb-3">
<div class="demo-section">
<kendo-form layout="grid" name="exampleForm" method="POST">
<form-items>
<form-item type="group" layout="grid">
<grid cols="6" />
<item-label text="Income Information - list every person living in the home" />
<form-items>
<form-item field="Name" col-span="1">
<item-label text="Name:"/>
</form-item>
<form-item field="Age" col-span="1">
<item-label text="Age:"/>
</form-item>
<form-item field="Relationship" col-span="1">
<item-label text="Relationship:"/>
</form-item>
<form-item field="Income" col-span="1">
<item-label text="Income:"/>
</form-item>
<form-item field="SourceOfIncome" col-span="1">
<item-label text="Source of Income:"/>
</form-item>
<form-item field="EBCIRoll" col-span="1">
<item-label text="EBCI Roll:" />
</form-item>
</form-items>
</form-item>
</form-items>
</kendo-form>
</div>
</div>
<style>
#example .demo-section {
max-width: 600px;
width: 600px;
}
</style>
如何控制這種形式?[1]:https ://demos.telerik.com/aspnet-core/form/layout
uj5u.com熱心網友回復:
使用 TagHelper,您需要設定buttons-templateorbuttons-template-id屬性。第一個接受模板作為字串,第二個接受外部模板。這是第二個選項的示例
<kendo-form buttons-template-id="myTemplate" layout="grid" form-data="@Model" name="exampleForm" on-validate-field="onFormValidateField" on-submit="onFormSubmit" on-clear="onFormClear" action="Layout" method="POST">
...
</kendo-form>
<script type="text/x-kendo-template" id="myTemplate">
<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-primary k-form-submit" type="submit">
<span class="k-button-text">Custom Submit Button</span>
</button>
<button class="k-button k-button-md k-rounded-md k-button-solid k-button-solid-base k-form-clear">
<span class="k-button-text">Clear</span>
</button>
轉載請註明出處,本文鏈接:https://www.uj5u.com/caozuo/504123.html
標籤:C# html asp.net-mvc-3 剑道衣 Telerik 网格
下一篇:角度資料系結結果為NaN
