如何在基于数据库数据的ng-repeat循环中使Kendo-UI Editor只读
How to make Kendo-UI Editor readonly inside a ng-repeat loop based on database data
我必须根据可编辑或只读的数据库列表形成重复的剑道编辑器。我能够实现重复的编辑器,但无法使其基于某些数据库字段只读。这个只读必须在页面加载事件中完成。
我正在使用angularjs。
<fieldset data-ng-repeat="source in sourceData">
<textarea kendo-editor="editorwidget" ng-model="source.Text" id="{{source.id}}" k-tools='[
"bold", "italic", "underline", "createTable", "addColumnLeft", "addColumnRight",
"addRowAbove",
"addRowBelow", "deleteRow", "deleteColumn", "justifyLeft",
"justifyCenter",
"justifyRight",
"justifyFull",
"insertUnorderedList",
"insertOrderedList",
"indent",
"outdent"
]'></textarea></fieldset>
请帮我一下。
只读模式只能在编辑器小部件已经创建时以编程方式触发。
http://docs.telerik.com/kendo-ui/controls/editors/editor/overview configuration-Apply
从这个角度来看,您可以使用kendoWidgetCreated
事件或kendoRendered
。
在第一种情况(kendoWidgetCreated
)中,您将处理单个Editor实例,而在第二种情况(kendoRendered
)中,通过获取所有textarea
元素和相应的Editor小部件对象来迭代所有这些实例。
http://docs.telerik.com/kendo-ui/AngularJS/introduction widget-references
http://docs.telerik.com/kendo-ui/intro/widget-basics/events-and-methods get-widget-reference
相关文章:
- 使用导航属性创建Kendo UI网格模型的问题
- 在编辑内联模式下禁用Kendo Ui网格按钮
- Typescript Kendo UI网格列类型错误
- Kendo UI网格:数据源刷新后,我丢失了分页
- Kendo UI网格复选框列字段未定义
- 寻找使用Javascript从Kendo UI时间选择器中减去时间的更好替代方案
- Kendo UI Multiselect+ServerFiltering+带初始值的ServerPaging
- Kendo UI网格自定义编辑按钮
- 如何使用jQuery在模板kendo UI中获取元素类
- Kendo Ui CSS和JS文件要求
- Kendo UI网格有条件可编辑的单元格
- 在Kendo UI中将网格pageSize设置为变量
- Javascript使用自定义按钮手动打开Kendo UI网格编辑器
- Kendo UI层次结构DataSource架构不工作
- 如何在webdriver/java/kendo-ui中自动执行鼠标悬停操作
- Kendo UI数据源使用javascript对象设置
- AngularJs的Kendo UI:当用户在网格中选择行时,如何在文本框字段上绑定数据
- 在Javascript中创建自定义的可重用控件(Kendo UI)
- Kendo UI树视图中的延迟加载(带缓存)
- 如何在基于数据库数据的ng-repeat循环中使Kendo-UI Editor只读