datagrid of easyui usage records

datagrid table is based on the change came, instead of up on the basis of the div. From div to become datagrid, style settings or is more trouble.

dg = datagrid title comes from the columns attribute, the content from the url property. The key is that we must set this property in order to show you the title and content, or even if you write and so will not show tr

Dg url content of the final output must be json format: If it is php, then use the echo, if other documents necessary to use json data

The most important thing is: dg communication between front-end and back-end servers, are achieved through ajax way. If you have sleep statement in php, then you will see loads loading ... wait for results. ajax submit occurs every time you click on the Next button at the front desk, etc., when the time required to submit at the front desk ajax, transfer data to the back-end server; json format data needs to be returned back to the front desk.

And it seems that way ajax post method.
For example: paging, front-end need to pass data to the background: one page (current page number, that is, the first few pages?), Is a pageSize (a number of pieces of data). Then background post pages and page numbers obtained in the mysql query statement, with limit start rowsCount, defined to standardize the data is returned.
Moreover, in addition to the return portion of the background of the current page rows of data needed, but also returned a total total number of pages.
The final result should be rewritten to return json format: This type:{"total": $total, "rows": .....}

Guess you like

Origin www.cnblogs.com/bkylee/p/10947632.html
Recommended