multi-select

How to set the selected value of the ng2-select

左心房为你撑大大i 提交于 2019-12-08 02:29:17
问题 I am working on angular2 application, I have use the ng2-select for the multiselect dropdown. Its working fine while creating new entry. But when trying to implement same while editing I am not able to set the default selected values pulled form database . <ng-select [initData]="aminities" (data)="refreshValue($event)" [multiple]="true" [items]="items" [disabled]="disabled"></ng-select> export class EditProjectComponent { project: ProjectModel; routeParam: RouteParams; aminities: any; private

How to add “select all” functionality to ng-select in Angular 5

时间秒杀一切 提交于 2019-12-07 22:39:09
问题 I found an examle which can do "select all": https://ng-select.github.io/ng-select#/multiselect-checkbox But, I get an error: Cannot read property 'selected' of undefined. I am wondering why I got this error, and how to implement "select all" using ng-select in Angular 5. Thank you 回答1: Using ng-select in Angular 5 limits you to using v1.6.3 of ng-select (or < v2.x), but you can accomplish this using the ng-select header template. I included the code below, but this is a working Stackblitz I

Two Way Binding on Multi-select WinForms Listbox?

扶醉桌前 提交于 2019-12-07 17:55:31
问题 I have a project where we are loading a multi-select listbox from a collection of objects. I have another entity object that has a collection that I want to bind to SelectedItems somehow. Is there any way to do this using object binding sources or some kind of binding source without writing code? Sure I can loop through the collection and get the selected items but I'd prefer to do it more cleanly with windows data-binding. Is this possible? 回答1: Unfortunately you can't bind the SelectedItems

Bokeh Multi-Select widget callback not Working

為{幸葍}努か 提交于 2019-12-07 12:44:29
问题 I am new to Bokeh. Trying to implement few widget callbacks recently and hard to find any resources online. Scenario: I have a multi_select bokeh widget with the list of the companies. Based on the companies selcted, data in the Vbar has to be changed. For this, i am trying to change the datasource that is used in the Vbar based on the values from Multi select. I am unable to get desired results. Can someone please help me out with this. I am poor at CustomJs and hence doing this on Bokeh

javafx8 TableView Multiselection returns one of the selected items as null

冷暖自知 提交于 2019-12-07 01:03:19
问题 TableView multi selection returns one of the selected objects as null. This doesn't happen every time but happens most of the times when i try to select two rows in the table.similar to the issue defined in this question Best way of reproducing the issue is , try selecting two sequential rows . FXML : <?xml version="1.0" encoding="UTF-8"?> <?import javafx.scene.control.Label?> <?import javafx.scene.control.ProgressBar?> <?import javafx.scene.control.TableColumn?> <?import javafx.scene.control

How to load selected list items in multiple-select-listbox in update view in yii?

我只是一个虾纸丫 提交于 2019-12-07 01:00:37
问题 I have a multiple select-list-box for Staff in Create-Service-Form , used to select multiple staff when creating a new service. for this i can assign multiple staff on a single service. I saved staff_id field as: $model->staff_id = serialize($model->staff_id); Here the update-view code for multiple-select-list-box: <div class="row"> <?php echo $form->labelEx($model,'staff_id'); ?> <?php $data = array('1' => 'Sam', '2' => 'john', '3' => 'addy'); $htmlOptions = array('size' => '5', 'prompt'=>

GWT Multiselect Dropdown Listbox

这一生的挚爱 提交于 2019-12-06 15:43:10
I'm looking to create a multi-select dropdown listbox in GWT, but I'm not sure how to go about doing so. I'd like it to be similar to this: Any suggestions? Should I take gwt ListBox code and adapt it to accept objects? Or should I forget their Listbox and try to make my own from scratch? Or should I go in a different direction completely? I'd really prefer not to include external libraries (like SmartGWT) if possible - I'm trying to stick with straight-up GWT. Please advise. Thanks! For anyone interested, I actually ended up rolling my own... It's a TextBox with an Image next to it. And each

Javascript - Which event to use for multiselect change

狂风中的少年 提交于 2019-12-06 15:41:51
I'm using YUI as javascript framework, and can successfully react when the user changes the value of basic input fields, the reaction being to sent an Ajax query. However, I'm not so lucky with multiselect dropdown lists: listening to "change" would send my query each time the user adds/removes an item to his selection listening to "blur" requires the user to click elsewhere in order to loose the focus and send the query (not very usable), plus it would send the query if the user only scrolls on the list without changing anything (useless, confusing). Any idea (with YUI), that would use a

asp.net jqGrid dropdown multiselect

情到浓时终转凉″ 提交于 2019-12-06 15:04:56
i'm trying to use jQuery multiselect plugin in a form editing jqGrid (add form). This is the code ( colModel extract) I'm using to build the dropdown: { name: 'CaratteristicheCamera', index: 'CaratteristicheCamera', width: 50, hidden: true, edittype: 'select', editable: true, editrules: { edithidden: true, required: true }, editoptions: { multiselect: true, dataUrl: '<%# ResolveUrl("~/Service/Domain/ServiceRoom.asmx/GetRoomFeatureList") %>', buildSelect: function (data) { var retValue = $.parseJSON(data); var response = $.parseJSON(retValue.d); var s = '<select id="CaratteristicheCamera" name=

jQuery Mobile multi-select box

感情迁移 提交于 2019-12-06 09:06:29
问题 So multi-select boxes aren't the nicest inputs to work with in the word, but they can sometimes be good. In my case for jQuery mobile they create a dialog box that overlays the page with all the options the user can select. <div data-role="fieldcontain"> <label for="select-choice-1" class="select">Choose shipping method:</label> <select name="select-choice-1" id="select-choice-1" multiple="multiple"> <option value="standard">Standard: 7 day</option> <option value="rush">Rush: 3 days</option>