3
* Copyright(c) 2006-2010 Ext JS, Inc.
5
* http://www.extjs.com/license
8
* @class Ext.grid.RowNumberer
9
* This is a utility class that can be passed into a {@link Ext.grid.ColumnModel} as a column config that provides
10
* an automatic row numbering column.
13
// This is a typical column config with the first column providing row numbers
14
var colModel = new Ext.grid.ColumnModel([
15
new Ext.grid.RowNumberer(),
16
{header: "Name", width: 80, sortable: true},
17
{header: "Code", width: 50, sortable: true},
18
{header: "Description", width: 200, sortable: true}
22
* @param {Object} config The configuration options
24
Ext.grid.RowNumberer = Ext.extend(Object, {
26
* @cfg {String} header Any valid text or HTML fragment to display in the header cell for the row
27
* number column (defaults to '').
31
* @cfg {Number} width The default width in pixels of the row number column (defaults to 23).
35
* @cfg {Boolean} sortable True if the row number column is sortable (defaults to false).
40
constructor : function(config){
41
Ext.apply(this, config);
43
this.renderer = this.renderer.createDelegate(this);
56
renderer : function(v, p, record, rowIndex){
58
p.cellAttr = 'rowspan="'+this.rowspan+'"';
b'\\ No newline at end of file'