actionComplete: (args) => {
if ((args.requestType === 'beginEdit' || args.requestType === 'add')) {
var dialog = args.dialog; dialog.height = '600'; dialog.width = '500'; dialog.header = args.requestType === 'beginEdit' ? 'Update Record' : 'New Record';
window.localData = [ { id: 1, name: 'Discover Music', hasChild: true, expanded: true }, { id: 2, pid: 1, name: 'Hot Singles' }, { id: 3, pid: 1, name: 'Rising Artists' }, { id: 4, pid: 1, name: 'Live Music' }, { id: 7, name: 'Sales and Events', hasChild: true }, { id: 8, pid: 7, name: '100 Albums - $5 Each' }, { id: 9, pid: 7, name: 'Hip-Hop and R&B Sale' }, { id: 10, pid: 7, name: 'CD Deals' }, { id: 11, name: 'Categories', hasChild: true }, { id: 12, pid: 11, name: 'Songs' }, { id: 13, pid: 11, name: 'Bestselling Albums' }, { id: 14, pid: 11, name: 'New Releases' }, { id: 15, pid: 11, name: 'Bestselling Songs' }, { id: 16, name: 'MP3 Albums', hasChild: true }, { id: 17, pid: 16, name: 'Rock' }, { id: 18, pid: 16, name: 'Gospel' }, { id: 19, pid: 16, name: 'Latin Music' }, { id: 20, pid: 16, name: 'Jazz' }, { id: 21, name: 'More in Music', hasChild: true }, { id: 22, pid: 21, name: 'Music Trade-In' }, { id: 23, pid: 21, name: 'Redeem a Gift Card' }, { id: 24, pid: 21, name: 'Band T-Shirts' }, { id: 25, name: 'Fiction Book Lists', hasChild: true }, { id: 26, pid: 25, name: 'To Kill a Mockingbird' }, { id: 27, pid: 25, name: 'Pride and Prejudice' }, { id: 28, pid: 25, name: 'Harry Potter' }, { id: 29, pid: 25, name: 'The Hobbit' }, ];
new ej.dropdowns.DropDownTree({ allowFiltering: true, showClearButton: true, popupHeight: '200px', floatLabelType: 'Always', fields: { dataSource: localData, value: 'id', text: 'name', parentValue: 'pid', hasChildren: 'hasChild' }, placeholder: 'Parent' }, args.form.elements.namedItem('parent'));
|