- Home
- Forum
- ASP.NET Core - EJ 2
- Prevent mobile controls
Prevent mobile controls
Hi,
I'm trying to set up a dropdown list to certain height as follows:
<ejs-dropdownlist focus="false" id="itemList" dataSource="Model.CatalogItems" popupHeight="200px" placeholder="Select an item" ejs-for="CatalogItemId" name="CatalogItemId" allowFiltering="true" filterType="Contains">
<e-dropdownlist-fields text="Text" value="Value"></e-dropdownlist-fields>
</ejs-dropdownlist>
<span asp-validation-for="CatalogItemId" class="text-danger"></span>
However, when view it on mobile it still takes the whole screen.
Please advise
SIGN IN To post a reply.
3 Replies
1 reply marked as answer
JC
Joseph Christ Nithin Issack
Syncfusion Team
April 7, 2021 11:21 AM UTC
Hello Premier Digital Designs,
Greetings from Syncfusion support.
We have checked your query, If you want to prevent the default mobile mode behavior you have to just set ’browserDetails.isDevice’ as false in the ‘created’ event of the dropdownlist. Please refer the below code snippet.
|
<div class="control-wrapper">
<div id="default" style='padding-top:75px;'>
<ejs-dropdownlist id="vegetable" dataSource="@ViewBag.data" created="created" placeholder="Select a vegetable" popupHeight="200px">
<e-dropdownlist-fields value="Vegetable"></e-dropdownlist-fields>
</ejs-dropdownlist>
</div>
</div>
<script type="text/javascript">
function created(args) {
browserDetails.isDevice = false;
}
</script>
|
Please find the attached sample and revert for more queries.
Regards,
Joseph Christ Nithin I.
Marked as answer
PD
Premier Digital Designs
April 7, 2021 02:10 PM UTC
Hi Joseph,
Thanks for snippet! It worked really well. One last question. On said dropdowns whenever an option is chosen mobile devices will zoom in into the input is there a way to prevent that as well?
Thanks for quick response!
JC
Joseph Christ Nithin Issack
Syncfusion Team
April 9, 2021 06:28 AM UTC
Hello Premier Digital Designs,
Thanks for the update.
We have checked your query. We were not able to replicate the mentioned issue. It would be helpful if you provide the following information to give a better solution.
- Replication steps for the issue.
- Images or video for the replication of the issue.
- Browser which you are using.
Regards,
Joseph Christ Nithin I.
SIGN IN To post a reply.
- 3 Replies
- 2 Participants
- Marked answer
-
PD Premier Digital Designs
- Apr 6, 2021 09:27 PM UTC
- Apr 9, 2021 06:28 AM UTC