Using the URL method for beginners, often encounter the problem of repeated requests, the root cause of this problem is because once the URL parameters are set, the DataGrid component in the instantiation of the request, how to avoid the problem of secondary loading, the personal attention to the following two points basic can be prevented two times load. Using the load and reload functions to load the data dynamically instead of choosing to render the component again, the purpose of rendering the component again is simply to set the URL, which is not worth the effort, and the URL's settings can be obtained through the options method to the opts of the component instance. And then re-assign the value to the Opts.url, the class method to register the component, generally only write properties in the DOM, and the event is usually called the DataGrid constructor with Javascipt registration, the process has occurred two requests: the first time is the class mode instantiation , and the second time is when the JavaScript registers the event. So in the case of binding events, simply do not use the class method to register. Say so much in fact all above is nonsense; directly above: <table id= "Materialdata" class= "Easyui-datagrid" data-options= "toolbar: ' #tb '" ></ Table> to remove the class here, instead:
<table id= "Materialdata" data-options= "toolbar: ' #tb '" ></TABLE> because we wrote this in JS: $ (' #materialData '). The DataGrid ({}), so the body does not have to write his class, otherwise in the page load "table" when the call back, and in JS will also go to call. First write so much to understand it, and later found that the understanding of the wrong to add.