Hi RJ,
Based on your shared images, you can get the component
instance value by using below code example instead of you have used Essential
JavaScript 1 instance method.
Find the code example here:
|
<ejs-dropdownlist
id="vegetable"
dataSource="@ViewBag.data" placeholder="Select
a vegetable" popupHeight="220px">
<e-dropdownlist-fields value="Vegetable"></e-dropdownlist-fields>
</ejs-dropdownlist>
<ejs-button id="butn" onclick="onRestore()"
content="resetclick"></ejs-button>
<script>
function onRestore(){
// get the instance using ej2_instance method
var instance = document.getElementById("vegetable").ej2_instances[0];
console.log(instance);
}
</script>
|
Regards,
Sureshkumar P