Last active
April 4, 2019 23:49
-
-
Save keerthanaRajendran/b3eba83c90e64ff23c86abd7cbd1023d to your computer and use it in GitHub Desktop.
Dropdownlist : checkbox
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<template> | |
<div> | |
</div> | |
<div class="form-row"> | |
<div class="col-6"> | |
<fieldset class="form-group"> | |
<label class="form-label semibold">Client (Works)</label> | |
<input type="text" id="selectCustomer" ej-drop-down-list="e-width:100%;e-data-source.bind:metadataService;e-fields.bind:{ text: 'displayName', value: 'parentId' };e-watermark-text.bind:'Select...';" e-on-change.trigger='onchange($event)'/> | |
</fieldset> | |
</div> | |
<div class="col-6"> | |
<fieldset class="form-group"> | |
<label class="form-label semibold">Select Search Type (Freezes - does not work)</label> | |
<input type="text" id="selectSearchRequest" | |
ej-drop-down-list="e-width:100%;e-data-source.bind:dataService;e-watermark-text.bind:'Select...';e-fields.bind: { text: 'shortDescription', value: 'parentId' };" /> | |
</fieldset> | |
</div> | |
</div> | |
</template> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export class EjDDLCheckBox { | |
metadataService = [{ | |
parentId: 'a', | |
displayName: "Group A" | |
}, { | |
parentId: 'b', | |
displayName: "Group B" | |
}]; | |
dataService =[{ | |
value: 11, | |
parentId: 'a', | |
shortDescription: "Algeria" | |
}, { | |
value: 12, | |
parentId: 'a', | |
shortDescription: "Armenia" | |
}, { | |
value: 13, | |
parentId: 'a', | |
shortDescription: "Bangladesh" | |
}]; | |
data2=[{ | |
value: 15, | |
parentId: 'b', | |
shortDescription: "Denmark" | |
}, { | |
value: 24, | |
parentId: 'b', | |
shortDescription: "Singapore" | |
}, { | |
value: 25, | |
parentId: 'b', | |
shortDescription: "Thailand" | |
}, { | |
value: 26, | |
parentId: 'b', | |
shortDescription: "Ukraine" | |
}] | |
constructor() { | |
} | |
onchange(event) | |
{ | |
var ddlObj=$("#selectSearchRequest").data("ejDropDownList"); | |
if(event.detail.value=="a") | |
ddlObj.setModel({dataSource:this.dataService}) | |
else if (event.detail.value=="b") | |
ddlObj.setModel({dataSource:this.data2}) | |
} | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html xmlns="http://www.w3.org/1999/xhtml"> | |
<head> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> | |
<meta name="description" content="Essential Studio for JavaScript"> | |
<meta name="author" content="Syncfusion"> | |
<title>Untitled</title> | |
<!-- Essential Studio for JavaScript theme reference --> | |
<link rel="stylesheet" href="https://cdn.syncfusion.com/14.2.0.28/js/web/flat-azure/ej.web.all.min.css" /> | |
</head> | |
<body aurelia-app="main"> | |
<h1>Loading...</h1> | |
<script src="https://cdnjs.cloudflare.com/ajax/libs/systemjs/0.19.6/system.js"></script> | |
<script src="https://rawgit.com/aurelia-ui-toolkits/aurelia-syncfusion-bundles/0.0.1/config2.js"></script> | |
<script> | |
System.import('aurelia-bootstrapper'); | |
</script> | |
</body> | |
</html> |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
export function configure(aurelia) { | |
aurelia.use | |
.standardConfiguration() | |
.developmentLogging() | |
.plugin('aurelia-syncfusion-bridge', syncfusion => syncfusion.useAll()); | |
aurelia.start().then(a => a.setRoot()); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment