jQuery UI Widgets › Forums › General Discussions › Angular › Integrate ngModel on dropdownlist when checkboxes is true
Tagged: Angular, DropDownList, ngModel
This topic contains 1 reply, has 2 voices, and was last updated by Martin 4 years, 7 months ago.
Viewing 2 posts - 1 through 2 (of 2 total)
-
Author
-
I have the dropdownlist below:
<jqxDropDownList id="{{id}}" [auto-create]="false" (onClose)="close($event)" (onCheckChange)="checkChange($event)" #dropdown></jqxDropDownList>The dropdownlist is initialized in the component using json.
this.dropdownListSettings = { theme: 'someTheme', source: this.source, checkboxes: true, height: 28, width: '99.5%', displayMember: "someDescription", valueMember: "someValue", placeHolder: "Choose", //To show the selected items in the widget selectionRenderer: (htmlString) => { let items = this.dropdown.getCheckedItems(); let checkedItems = ''; let allSelected = ''; if (angular.isDefined(items)) { angular.forEach(items, (item, index) => { if (item.label === this.allCategories) { allSelected += this.allCategories; return false; } else { if (checkedItems.length > 0) checkedItems += ", "; checkedItems += item.label; } }); } if (allSelected != ''){ return allSelected; } else { return checkedItems.length > 0 ? checkedItems : "Choose"; } } } this.dropdown.createComponent(this.dropdownListSettings);How do I implement ngModel? and also I want to use it in form-control
Hello jliterado,
Please, take a look at the following Example.
Best Regards,
Martin YotovjQWidgets Team
https://www.jqwidgets.com/ -
AuthorPosts
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic.