The Ext.grid.column.Template
class is a new column type that has been introduced in Ext JS 4. It allows a very easy mechanism for formatting a grid's columns with an Ext.XTemplate
so you can have full control over your grid's displayed data.
We will continue with our Invoice Management example, and in this recipe we are going to explore how to use this new class to add extra information and formatting to the Client and Amount grid columns.
As with all the recipes in this chapter so far, we are going to use the generic Invoices Ext.data.Model
and Ext.data.Store
, which can be found in the invoices-store.js
and invoices-model.js
. These have been bundled with the resources for this chapter and both files will need to be included in your HTML like so:
<script type="text/javascript" src="invoices-model.js"> </script> <script type=—text/javascript— src=—invoices-store.js—> </script>