Easyuicombox cannot load data

Source: Internet
Author: User

I:

Under jquery. easyui. min1.3.2:

 
<InputID= "Field"Class= "Easyui-ComboBox"Data-Options= "Data: [{'id': 1, 'text': 'record serial number ', 'selected': true}, {'id': 2, 'text ': 'Operation UnitCode'}, {'Id': 3, 'text': 'pos host No.'}, {'id': 4, 'text': 'surface No '}, {'id': 5, 'text': 'transaction amount '}, {'id': 6, 'text': 'balance of the card before consumption '}, {'id': 7, 'text': 'transaction amount '}, {'id': 8, 'text': 'transaction date'}, {'id ': 9, 'text': 'transaction time'}], valuefield: 'id', textfield: 'text', multiple: True, Editable: false, panelheight: 'auto '">

This method can be loaded normally, if the version isJquery. easyui. min1.2.6 is not supported..

2: When jquery. easyui. min1.2.6:

  

In this way, load normally.

In addition, if your JSON file is in an independent file and you want to load it in URL mode, there are two problems. For static files, you can only use get, method: 'get ',

Second: If the JSON file contains Chinese characters, it will be troublesome. garbled characters are used directly. If you load it dynamically, then response. the write () method is returned to the URL. Note that transcoding is required here. If you directly <%> use a tag to write it to the page, you can.

 

In the last question, I changed the easyui version from 1.2.6 to 1.3.2.

Obviously, the DataGrid has a problem.

HoweverThe first method supported by combox to load JSON may be updated in this version.But why is this problem in the DataGrid? I still used 1.2.6.

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.