Reordering in Angular ListBox.
A live Angular example of jqxListBox, the jQWidgets ListBox component, with its complete source code below. It is one of 18 jqxListBox demos for Angular.
allowDrag property – Enables/disables the dragging of ListBox Items.allowDrop property – Enables/disables the dropping of ListBox Items.height property – Sets or gets the listbox's height.source property – Sets or gets the item's source.width property – Sets or gets the listbox's width.To run it in your own app, install the package with npm install jqwidgets-ng, add these files to a standalone Angular CLI app, and add jqx.base.css and a theme to the styles in angular.json. Getting started with jqxListBox shows the setup step by step.
import { Component } from '@angular/core';
import { CommonModule } from '@angular/common';
import { jqxListBoxModule } from 'jqwidgets-ng/jqxlistbox';
import { jqxDragDropModule } from 'jqwidgets-ng/jqxdragdrop';
@Component({
imports: [CommonModule, jqxListBoxModule, jqxDragDropModule],
selector: 'app-root',
templateUrl: './app.html'
})
export class App {
data: string[] = [
"Affogato",
"Americano",
"Bicerin",
"Breve",
"Café Bombón",
"Café au lait",
"Caffé Corretto",
"Café Crema",
"Caffé Latte",
"Caffé macchiato",
"Café mélange",
"Coffee milk",
"Cafe mocha"
];
}
<jqxListBox #Country
[allowDrop]="true"
[allowDrag]="true"
[source]="data"
[width]="200"
[height]="250">
</jqxListBox>