You cannot select multiple items in dropdownlist.

Source: Internet
Author: User

This is a small problem, but it took me some time. It seems that some small knowledge points have to be concerned.
Problem: the data obtained from the database is bound to the dropdownlist, And the dropdownlist write is dead. As long as it matches the data in the database, some items are selected by default. The data can be read normally, but it will appear in the dropdwonlist.
You cannot select multiple items in dropdownlist to report an error.
At first, I thought there was a problem with the data and business logic in the database. After checking, I found that there was no problem. I looked for the dropdownlist help and finally found a good thing.
Clearselection ()
In addition, it will not cause problems: dropcurrencetype. clearselection ();
In addition, some friends asked how to bind the data as updated to the dropdownlist, which is actually quite simple.
Dropcurrencetype. Items. findbyvalue (spinfo. currencytype. tostring (). Trim (). Selected = true;
Dropcurrencetype. Items. findbytext (spinfo. currencytype. tostring (). Trim (). Selected = true;
I would like to share with you a little bit of knowledge.
This article from: http://www.dezai.net/blog/blogview.asp? Logid = 194

Http://www.cnblogs.com/eastjazz/archive/2008/05/08/1188146.html

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.