Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
148516 | Oct 23,2019 11:35 AM UTC | Nov 11,2019 10:03 AM UTC | ASP.NET Core - EJ 2 | 9 |
![]() |
Tags: MultiSelect Dropdown |
// Instance created on multiselect component
var multiselectObj = document.getElementById('ddlFilterEmployee').ej2_instances[0];
// Get the selected value through Value property
console.log(multiselectObj.value); |
function OnSelect(args) {
var multiselectObj = document.getElementById('ddlFilterEmployee').ej2_instances[0];
console.log(args.itemData[multiselectObj.fields.value]);
} |
@using Syncfusion.EJ2;
@using Syncfusion.EJ2.Inputs;
@Html.EJS().MultiSelect("ddlFilterEmployee").Change("OnChange").ChangeOnBlur(false).Placeholder("Select a Country").PopupHeight("200px").DataSource(dataManger =>
dataManger.Url("/Home/UrlDatasource").Adaptor("UrlAdaptor").CrossDomain(true)).Fields(new Syncfusion.EJ2.DropDowns.MultiSelectFieldSettings
{
Value = "shipCountry", Text="shipCountry"
}).Render()
<script>
function OnChange() {
var multiselectObj = document.getElementById('ddlFilterEmployee').ej2_instances[0];
console.log(multiselectObj.value);
}
</script> |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.