BoldSignEasily embed eSignatures in your .NET applications. Free sandbox with native SDK available.
[controller.cs] public class YearData { public string year { get; set; } public string type { get; set; } } public static class YearsModel { public static List<YearData> years = new List<YearData>(); public static List<YearData> setYears() { years.Add(new YearData { year = "1970", type = "even" }); years.Add(new YearData { year = "1971", type = "odd" }); years.Add(new YearData { year = "1972", type = "even" }); years.Add(new YearData { year = "1973", type = "odd" }); return years; |
[cshtml] @Html.EJMobile().DropDownList("dd_databind").DataSource(Model).ClientSideEvents(evt => evt.Change("change")).Fields(field => field.Text("year").Value("type")) |
[cshtml] @Html.EJMobile().DropDownList("dd_databind").DataSource(Model).ClientSideEvents(evt => evt.Change("change")).Fields(field => field.Text("year").Value("type")) <script> function change(args) { var instance = $("#dd_databind").data("ejmDropDownList"); $("#value").empty(); $("#value").append("Selected value: " + instance.getSelectedItemValue()); //gets the value of the selected list item } |
We have confirmed that “Value cannot be retrieved in form submit for DropDownList” as a defect and logged a defect report and a support incident has been created under your account to track the status of this requirement. Please log on to our support website to check for further updates.
https://www.syncfusion.com/account/login?ReturnUrl=/support/directtrac/incidents
Query2: In Android phone style /tested on phone/ when we have DropDownList and choose an option from the drop-down list if this option is covered another visual element /text, datetime, DropDownList or other/ the choice is triggered coated visual element if pressed.
The element underneath the popup controls(Menu, Dialog, DropDownList etc..) gets triggered while selecting the popup control elements(For DropDownList, it is suggestion list wrapper) is a known issue in touch devices which is commonly known as “GhostClick”. Refer to the following links for more information.
https://github.com/ftlabs/fastclick/issues/130
http://ariatemplates.com/blog/2014/05/ghost-clicks-in-mobile-browsers/
This could be prevented in sample level by using pointer events for respective events, such as focusIn and focusOut.
[cshtml] @Html.EJMobile().DropDownList("dd_default").SelectedItemIndex(1).TargetID("targetDiv").ClientSideEvents(c => c.FocusIn("focusIn").FocusOut("focusOut")) |
[cshtml] <script> function focusIn(args) { //Add pointer events as none to the AppView App.activePage.css('pointer-events', 'none'); //Add pointer events as auto to the DropDown suggestion list. $("#dd_defaultlist").css("pointer-events", 'auto'); } |
[cshtml] <script> function focusOut(args) { window.setTimeout(function () { //Add pointer events as auto to Appview App.activePage.css('pointer-events', 'auto'); }, 100); } // To add the pointer events to appview for closing the suggestion list on document click $(document).bind("click", function () { App.activePage.css("pointer-events", "auto"); }) |
Regards,
Dhinesh R