kendo ui コントロール操作
来源:互联网 发布:网络广告公司铭心科技 编辑:程序博客网 时间:2024/06/06 19:02
●ボタンアイコン
<button id="btnSearch"
data-role="button"
data-icon="search"/** plus,edit,delete**/
class="k-primary">
Search
</button>
●ボタン検索
<input id="txtSearchID" class="k-textbox" type="text" data-bind="value: searchID" />
<input id="txtSearchName" class="k-textbox" type="text" data-bind="value: searchName" />
<button class="btn blue-gradient btn-rounded waves-effect"
data-bind="click: onSearch">
<i class="fa fa-search mr-1"></i>
Search
</button>
*** ts:
private _searchID = UE.String.empty;
public get searchID(): string {
return this.get("_searchID");
}
public set searchID(value: string) {
if (this._searchID === value) {
return;
}
this.set("_searchID", value);
}
private _searchName = UE.String.empty;
public get searchName(): string {
return this.get("_searchName");
}
public set searchName(value: string) {
if (this._searchName === value) {
return;
}
this.set("_searchName", value);
}
public onSearch(): void {
const varId = this.searchID;
const varName = this.searchName;
$("#grid").data("kendoGrid").dataSource.filter([
{ field: "ProductID", operator: "contains", value: varId },
{ field: "ProductName", operator: "contains", value: varName },
]);
}
●pop modal window
<!--POP Window HTML-->
<div id="window"
data-role="window"
data-title="my title"
data-actions="['Close']"
data-visible="false"
data-width="600px"
data-center="true"
data-modal="true">
....
<div>
<a class="btn-floating btn-sm blue-gradient waves-effect"
data-bind="click: onOpenPopup">
<i class="fa fa-list"></i>
</a>
**ts:
public onOpenPopup(): void {
$("#window").data("kendoWindow").center().open();
}
●grid onChange
<div id="gridDetail"
data-role="grid"
data-bind="source: testDataSource, events: { change: onChange }"
data-columns="[
{ 'field': 'ProductID', title: 'title 1' },
{ 'field': 'ProductName', title: 'title 2' },
]"
data-selectable="row"
data-pageable="true">
**ts:
public onChange(e: kendo.ui.GridChangeEvent): void {
alert(e.sender.dataItem(e.sender.select()));
}
public readonly testDataSource = new kendo.data.DataSource({
transport: {
read: {
url: "https://demos.telerik.com/kendo-ui/service/Products",
dataType: "jsonp",
},
update: {
url: "https://demos.telerik.com/kendo-ui/service/Products/Update",
dataType: "jsonp",
},
destroy: {
url: "https://demos.telerik.com/kendo-ui/service/Products/Destroy",
dataType: "jsonp",
},
create: {
url: "https://demos.telerik.com/kendo-ui/service/Products/Create",
dataType: "jsonp",
},
parameterMap: (options, operation) => {
if (operation !== "read" && options.models) {
return { models: kendo.stringify(options.models) };
}
},
},
batch: true,
pageSize: 10,
schema: {
model: {
id: "ProductID",
fields: {
ProductID: { type: "string", editable: false, nullable: true },
ProductName: { validation: { required: true } },
UnitsInStock: { validation: { required: true } },
},
},
},
});
- kendo ui コントロール操作
- kendo ui PanelBar menu jquery 操作
- Kendo UI
- Kendo UI 框架 HTML5
- Kendo UI js
- Kendo UI Web扩展
- kendo ui listView
- kendo ui grid 汉化
- 接触kendo ui
- Kendo UI 学习
- kendo UI loading 操作方法:
- kendo ui (frozen column)
- Kendo UI使用笔记
- angularJs-kendo ui
- kendo Ui简介
- Kendo UI 使用札记
- Kendo UI Grid
- Kendo UI Grid
- java枚举类的使用
- C# winform中怎么实现左截取字符串和右截取字符串
- Python 字符串格式化
- 手把手教你整合最优雅SSM框架:SpringMVC + Spring + MyBatis
- 属性getter和setter
- kendo ui コントロール操作
- Android studio 打渠道包,同一工程不同包名
- 解决android运行启动两个虚拟机的问题
- [BZOJ]1486: [HNOI2009]最小圈 01分数规划+spfa
- javascript
- 作业
- Python数据结构之单链表
- 【Pyhton爬虫一】requests与BeautifulSoup
- 算法的基本特征