查看“Kendo ui”的源代码
←
Kendo ui
跳转至:
导航
、
搜索
因为以下原因,你没有权限编辑本页:
您请求的操作仅限属于该用户组的用户执行:
用户
您可以查看并复制此页面的源代码:
==Kendo UI autocomplete retrieve id on select== <source lang="javascript"> $("#autocomplete").kendoAutoComplete({ dataTextField: "Txt", select: function(e) { var dataItem = this.dataItem(e.item.index()); //output selected dataItem $("#result").html(kendo.stringify(dataItem)); }, dataSource: { data: [ { Txt : "GB1", value: 1 }, { Txt : "GB2", value: 2 }, { Txt : "GB3", value: 3 }, { Txt : "GB4", value: 4 } ] } }); </source> ==Auto complete filtering in kendo ui== This is the DataSource and AutoComplete definition: <source lang="javascript"> $("#products").kendoAutoComplete({ dataTextField: "name", filter: "contains", minLength: 3, dataSource: { transport: { read: { url: "/admin/countries", type: "POST", dataType: "json" } }, schema: { model: { id: "id", fields: { id: { type: "id" }, name: { type: "string" } } } } } }); </source> and this is how Countries list should be returned by the server. <source lang="javascript"> [ { "id":1, "name":"Albania" }, { "id":2, "name":"Andorra" }, { "id":3, "name":"Armenia" }, { "id":4, "name":"Austria" }, { "id":5, "name":"Azerbaijan" }, ... ] </source> ==自定义工具按钮== <source lang="css"> .k-editor .k-myTool { background: 50% 50% no-repeat url(http://digitaltools.node3000.com/wp-content/themes/digital-tools/images/rss-icon-16x16px.png); } </source> <source lang="javascript"> $("#editor").kendoEditor({ tools: [ { name: "myTool", tooltip: "My ToolTip", exec: function(e) { var editor = $(this).data("kendoEditor"); editor.exec("inserthtml", { value: '<img src="/images/275x185_2.jpg"/>' }); } } ] }); </source>
返回
Kendo ui
。
导航菜单
个人工具
登录
命名空间
页面
讨论
变种
视图
阅读
查看源代码
查看历史
更多
搜索
导航
首页
最近更改
随机页面
帮助
工具
链入页面
相关更改
特殊页面
页面信息