模板内的 kendoMultiSelect autoClose
kendoMultiSelect autoClose inside a Template
我在列表的 Kendo 模板 (type="text/kendo-x-tmpl"
) 中有一个多选项。
如果没有 jQuery,我找不到将 属性 autoClose
设置为 false
的方法。
<script type="text/kendo-x-tmpl" id="tmplRow">
<td style="width:100%" id="td">
<select data-id="myId" data-show=""
multiple="multiple"
data-role="multiselect"
data-text-field="Libelle"
data-value-field="IdProduct"
data-value-primitive="true"
data-loading-text="Chargement..."
data-bind="value: MyList, source: getSource, events: { select: onSelectedEvent, change: onChangeEvent }" />
</td>
</script>
任何想法都会对我有所帮助。谢谢
您可以使用此属性指定 autoClose
配置选项 data-auto-close="false"
:
<script type="text/kendo-x-tmpl" id="tmplRow">
<td style="width:100%" id="td">
<select data-id="myId" data-show=""
multiple="multiple"
data-role="multiselect"
data-text-field="Libelle"
data-value-field="IdProduct"
data-value-primitive="true"
data-loading-text="Chargement..."
data-bind="value: MyList, source: getSource, events: { select: onSelectedEvent, change: onChangeEvent }"
data-auto-close="false" />
</td>
</script>
documentation 给出了以下指导:
Each configuration option can be set with the data attribute of the target element. Add the "data-"
prefix to the name of the configuration option and specify the option value—for example, data-delay="100"
.
The camelCase options are set through dash-separated attributes. For example, the ignoreCase
option of the AutoComplete is set through data-ignore-case
.
Options which start with data
do not require an additional "data"
in the attribute name. For example, the dataTextField
option is set through the data-text-field
attribute and dataSource
is set through the data-source
attribute
有关详细信息,请参阅此处 Setting the data Options. See working demo。
我在列表的 Kendo 模板 (type="text/kendo-x-tmpl"
) 中有一个多选项。
如果没有 jQuery,我找不到将 属性 autoClose
设置为 false
的方法。
<script type="text/kendo-x-tmpl" id="tmplRow">
<td style="width:100%" id="td">
<select data-id="myId" data-show=""
multiple="multiple"
data-role="multiselect"
data-text-field="Libelle"
data-value-field="IdProduct"
data-value-primitive="true"
data-loading-text="Chargement..."
data-bind="value: MyList, source: getSource, events: { select: onSelectedEvent, change: onChangeEvent }" />
</td>
</script>
任何想法都会对我有所帮助。谢谢
您可以使用此属性指定 autoClose
配置选项 data-auto-close="false"
:
<script type="text/kendo-x-tmpl" id="tmplRow">
<td style="width:100%" id="td">
<select data-id="myId" data-show=""
multiple="multiple"
data-role="multiselect"
data-text-field="Libelle"
data-value-field="IdProduct"
data-value-primitive="true"
data-loading-text="Chargement..."
data-bind="value: MyList, source: getSource, events: { select: onSelectedEvent, change: onChangeEvent }"
data-auto-close="false" />
</td>
</script>
documentation 给出了以下指导:
Each configuration option can be set with the data attribute of the target element. Add the
"data-"
prefix to the name of the configuration option and specify the option value—for example,data-delay="100"
.The camelCase options are set through dash-separated attributes. For example, the
ignoreCase
option of the AutoComplete is set throughdata-ignore-case
.Options which start with
data
do not require an additional"data"
in the attribute name. For example, thedataTextField
option is set through thedata-text-field
attribute anddataSource
is set through thedata-source
attribute
有关详细信息,请参阅此处 Setting the data Options. See working demo。