Tangled click events and change events

Source: Internet
Author: User

When I was working on the data center charging system, there was a small problem that made me struggle for almost a day. Although I know it is easy to die, I just don't know how to solve it.

In the form of adding or deleting a user, a small function is to query user name, name, account holder, and other information based on the user level. User-level selection is achieved by selecting the ComboBox control drop-down option. Click the control on the form to switch to the code window.

When I typed all the code and started running it, I found that the mshflexgrid control could not display data at all, and it was empty. At that time, I was puzzled and thought that there was a problem with the SQL statement, and then I began to try it and did not solve it.

At that time, I was very entangled because I knew that this problem would be easy to solve, but I did not know where the error was.

Later, I got impatient and asked Zhang Wenkang if he caught one. He looked at my code and changed change to click. Then the program can display the query results.

Well, I admit that my foundation is not solid, and such problems should not have occurred. Now the problem is solved, but in order to learn the lesson, we must sum up and warn ourselves.

Taking the ComboBox control as an example, what are the differences between the click and change events?

The click event selects a list item, while the change event edits the content. The results of these two events change the actual content in the ComboBox control, but one is by clicking the mouse, that is, clicking; the other is to edit the content in the input box, that is, change.

In fact, as early as the acceptance of the student information system, master and I mentioned this problem, but at that time I did not care too much. As a result, I always had to pay back my debt. In the charging system, I had a hard time struggling. However, this is just a small start. I know that my basic skills are not solid, so there are still many questions like this, and I am always not careful when doing things, it is assumed that the event will be completed directly after it is clicked, and that the default event is correct.

Maybe after that, I should be more steadfast.

Author Information

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.