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.