我正在使用 kendo ui 多选
http://demos.kendoui.com/web/multiselect/events.html
我有这个代码
var data =
[
{ text: "Africa", value: "1" },
{ text: "Europe", value: "2" },
{ text: "Asia", value: "3" },
{ text: "North America", value: "4" },
{ text: "South America", value: "5" },
{ text: "Antarctica", value: "6" },
{ text: "Australia", value: "7" }
];
var multi = $("#select").kendoMultiSelect({
dataTextField: "text",
dataValueField: "value",
dataSource: data
}).data("kendoMultiSelect");
Run Code Online (Sandbox Code Playgroud)
现在我可以使用这个添加值
multi.value(["5", "3"]);
Run Code Online (Sandbox Code Playgroud)
现在我想从选定的值中删除
有什么方法可以使用value或删除值text
例如,如果我想删除,5那么有没有类似的方法multi.remove(["5"]);
或者有什么其他方法可以去掉???
当我尝试使用 Telerik 功能隐藏剑道多选的永久旋转忙指示器时:
var multi = $("#statusMultiselect").data("kendoMultiSelect");
kendo.ui.progress(multi, false);
Run Code Online (Sandbox Code Playgroud)
我收到 javascript 错误:
TypeError: t.find is not a function
Run Code Online (Sandbox Code Playgroud)
我不知道为什么?
我正在寻找带有搜索/过滤选项的ExtJS项目选择器.是否有现有的插件或实现它的任何想法?由于itemselector内部使用Multiselect,我是否需要在Multiselect上实现我自己的版本?
我需要一个具有以下功能的 kendo ui 下拉列表。
- 带有选择复选框的多选下拉菜单可一次检查多个选项。
- 选择所有复选框作为标题模板,当我单击它时,会选择该选项的所有过滤搜索结果。
我查阅了很多参考资料,并从 telrik 找到了一个接近的解决方案。至此我的第一个要求就满足了。我已在此处附加了代码片段。
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<title>Kendo UI Snippet</title>
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.common.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.rtl.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.silver.min.css" />
<link rel="stylesheet" href="http://kendo.cdn.telerik.com/2016.3.1028/styles/kendo.mobile.all.min.css" />
<script src="http://code.jquery.com/jquery-1.12.4.min.js"></script>
<script src="http://kendo.cdn.telerik.com/2016.3.1028/js/kendo.all.min.js"></script>
</head>
<body>
<div id="example" role="application">
<div class="demo-section k-header">
<h2>Invite Attendees</h2>
<label for="required">Required</label>
<select id="required" multiple="multiple" data-placeholder="Select attendees...">
<option selected>Steven White</option>
<option>Nancy King</option>
<option>Nancy Davolio</option>
<option>Robert Davolio</option>
<option>Michael Leverling</option>
<option>Andrew Callahan</option>
<option>Michael Suyama</option>
<option selected>Anne King</option>
<option>Laura Peacock</option>
<option>Robert Fuller</option>
<option>Janet …Run Code Online (Sandbox Code Playgroud) 我正在我的Laravel 5.3项目中尝试使用Vue Multiselect V2。我正在使用此示例,http://monterail.github.io/vue-multiselect/#sub-single-select
我的app.js文件中有以下设置:
Vue.component('multiselect', require('./components/Multiselect.vue'));
var vm = new Vue({
el: '#app'
});
Run Code Online (Sandbox Code Playgroud)
在Multiselect.vue文件中
<script>
import Multiselect from 'vue-multiselect'
export default {
components: {
Multiselect
},
data () {
return {
value: '',
options: ['Select option', 'options', 'selected', 'mulitple', 'label', 'searchable', 'clearOnSelect', 'hideSelected', 'maxHeight', 'allowEmpty', 'showLabels', 'onChange', 'touched']
}
}
}
</script>
Run Code Online (Sandbox Code Playgroud)
我在刀片中称呼它如下:
<div id="app">
<label class="typo__label">Single select</label>
<multiselect v-model="value" :options="options" :searchable="false" :close-on-select="false" :show-labels="false" placeholder="Pick a value"></multiselect>
<pre class="language-json"><code>@{{ value }}</code></pre> …Run Code Online (Sandbox Code Playgroud) 文档链接 我遵循上述文档链接来实现 Select-field 组件。我没有在此组件中找到用于 select all 的正确文档。
组件的导入语句
import SelectField from 'material-ui/SelectField';
Run Code Online (Sandbox Code Playgroud)
组件代码:
<SelectField
className="search_items"
multiple={true}
hintText="Select Item"
value={values}
onChange={this.handleChange} >
{this.menuItems(values)}
</SelectField>
Run Code Online (Sandbox Code Playgroud)
菜单项功能:
menuItems(values) {
return unique && unique.map((name) => (
<MenuItem
key={name}
insetChildren={true}
checked={values && values.indexOf(name) > -1}
value={name}
primaryText={name && name.concat('(').concat(sectors.filter(i => i === name).length).concat(')')}
/>
));
}
Run Code Online (Sandbox Code Playgroud)
OnChange 函数:
handleChange(event, index, values) {
this.setState({ values })
}
Run Code Online (Sandbox Code Playgroud)
如何为所有要选择的项目启用全选选项。提前致谢
我正在尝试修补 ng-select 下拉列表中的多个选定项目。我没有指定任何 bindValue,因此项目应该由对象绑定(如https://www.npmjs.com/package/@ng-select/ng-select中指定)
但是,在尝试执行此操作时,不会根据对象而是根据显示的标签来选择项目。此外,仅选择第一个标签。
示例:app.component.html
<form [formGroup]="group">
<div class="form-group" formGroupName="school">
<ng-select labelForId="school" placeholder="Select school" [items]="schools" formControlName="code"
bindLabel="displayLabel" multiple="true" groupBy="city">
</ng-select>
</div>
</form>
Run Code Online (Sandbox Code Playgroud)
应用程序组件.ts
import { Component, OnInit } from '@angular/core';
import { FormBuilder, FormGroup, FormControl, Validators } from '@angular/forms';
@Component({
selector: 'my-app',
templateUrl: './app.component.html',
styleUrls: ['./app.component.css']
})
export class AppComponent implements OnInit {
group: FormGroup;
schools = [];
constructor(private fb: FormBuilder) { }
ngOnInit() {
this.initSchools();
const formModel = {
school: new FormGroup({
code: new FormControl(null, Validators.required) …Run Code Online (Sandbox Code Playgroud) multi-select angular-ngselect dropdown angular angular-reactive-forms
我想在我的 Android 应用程序中进行多项选择。我以前做过,但只使用了 ArrayAdapter。
我有一个 Flow 作为我的数据集,并使用 PagingDataAdapter 和 ViewHolder。
我的问题是,如果数据集不仅仅是一个列表并且我无法真正轻松地访问它,如何进行多重选择。
如果您想查找代码,请查看以下内容:
我想创建一个选项芯片列表,并在其中选择多个选项。我还想在选择选项时更改颜色。选项是动态的。我尝试使用以下函数,但 onselectionchanged 显示空错误,并且点击时颜色不会改变。请问有什么建议吗??
_buildChoiceList() {
List<Widget> choices = [];
options.forEach((item) {
choices.add(Container(
padding: const EdgeInsets.all(2.0),
child: ChoiceChip(
label: Text(item),
selected: selectedOptions.contains(item),
backgroundColor: Color(0xffff08222),
onSelected: (selected) {
setState(() {
selectedOptions.contains(item)
? selectedOptions.remove(item)
: selectedOptions.add(item);
widget.onSelectionChanged(selectedOptions);
});
},
),
));
});
return choices;
}
Run Code Online (Sandbox Code Playgroud) 我是sql的新手.我必须选择销量最高的前3家公司
公司表:CompanyId,Compnayname等
订单表:OrderId,companyId,价格等
选择前三名公司名称(从ordes中选择总和(价格))作为最大公司订单的最大描述?
我想我需要加入这些但我无法找到解决方法
multi-select ×10
kendo-ui ×3
javascript ×2
android ×1
angular ×1
chips ×1
dropdown ×1
extjs4 ×1
flutter ×1
itemselector ×1
join ×1
jquery ×1
laravel ×1
material-ui ×1
paging ×1
reactjs ×1
select ×1
sql-server ×1
vue.js ×1
vuejs2 ×1