Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setting default value from remote url (json) #238

Open
tonykalok opened this issue Feb 26, 2022 · 0 comments
Open

Setting default value from remote url (json) #238

tonykalok opened this issue Feb 26, 2022 · 0 comments

Comments

@tonykalok
Copy link

using asp.net mvc5, may I know how to set default value from remote url (json)?
Tried using .val(1) or .val("1") but the textbox is showing id "1" but not the name with id 1. Did I miss anything? Thank you

    <input id="CustomerId" name="CustomerId" type="text"
           class="flexdatalist form-control"
           data-min-length="2"
           data-selection-required="true"
           data-allow-duplicate-values="false"
           data-search-contain="true"
           data-max-shown-results=10
           data-search-delay=50
           data-cache="true"
           data-cache-lifetime=1
           data-url=**'/api/customers'**
           data-search-in='["name"]'
           data-visible-properties='["name"]'
           data-value-property='id'
           data-text-property='{name}'>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant