Load local data using the loaddata method of the combogrid control in easyui

Source: Internet
Author: User
Document directory
  •  

Easyui is used in a project, and I need to design databases and write complex stored procedures. I have insufficient front-end staff, I am also familiar with the business and I am also familiar with the previous sections, but I have never used easyui. So I looked at the API to write the previous sections, one problem encountered in the past two days is to cascade the data in combogrid. I couldn't load the data. I also asked questions in the blog. I also asked questions in oschina. On New Year's Day, everyone had a holiday and didn't answer the question. The Code is as follows:

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

The most important thing is the last two loaddata. It is successfully loaded in the DataGrid and cannot be loaded in combogrid, but the document says:

 
The combination table inherits $. FN. Combo. defaults and $. FN. DataGrid. defaults, and uses $. FN. combogrid. defaults to overload the default value. Event Events inherit the custom combo box and data table.

I assume that loaddata is inherited by combogrid. Then I went crazy about debugging. Today I read the combogrid document again. There is such a method.

Grid None Returns a data table object.

Suddenly, it suddenly became clear.

You only need to modify the above:

  $("#cc").combogrid("grid").datagrid("loadData", a);

Solved.

This is a waste of two days because you are not familiar with the API. This lesson tells me that you need to find a solution to unfamiliar things in the document, including the problem of DataGrid editing a few days ago, there are two examples in the official document. Pay attention to official documents.

 

 

 

 

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.