剑道用户界面。为从其他小组件创建的"child"小组件设置名称/ID



当使用Kendo网格时,可以创建子部件,例如编辑器中的自定义下拉列表或网格详细信息模板中的子网格。操作这些子元素比较困难,因为它们没有给定id或名称。在安装过程中添加这些属性是否可行?我没有在API中找到这个。例如

$("#rebatesGrid").kendoGrid({
    ...
    edit: fnRebateDropDownEditor,
    detailInit: fnRebateGridDetailInit,
    ...
});
function fnRebateDropDownEditor(container, options) {
    $('<input required name="' + options.field + '" />').appendTo(container)
        .kendoDropDownList({ ... ? set id/name ? ...
function fnRebateGridDetailInit = (e) {   
    $("<div/>").appendTo(e.detailCell)
    .kendoGrid({ ... ? set id/name ? ...

直接添加到元素中。

function fnRebateDropDownEditor(container, options) {
    $('<input required name="' + options.field + '" id="test" />').appendTo(container)
     .kendoDropDownList({ ...

现在,下拉列表将得到id "test"。

最新更新