jQuery EasyUI Data Grid - Creating footer summary
In this tutorial, we'll show you how to display summary information footer row in the data grid (datagrid).
In order to display the footer line, you should set showFooter property is true, then prepare defined in the data grid (datagrid) data footer rows. The following is a sample data:
{ "Total": 1, "rows": [{ "id": 1, "name": "Chai", "price": 18.00}], "footer": [{ "name": "Total", " price ": 18.00}]}
Creating a Data Grid (DataGrid)
<Table id = "tt" title = "DataGrid" class = "easyui-datagrid" style = "width: 400px; height: 250px" url = "data / datagrid17_data.json" fitColumns = "true" rownumbers = "true" showFooter = "true"> <Thead> <Tr> <Th field = "name" width = "80"> Product Name </ th> <Th field = "price" width = "40" align = "right"> Unit Price </ th> </ Tr> </ Thead> </ Table>
Footer rows and rows of data to display the same, so you can display more than one summary information in the footer.