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