I copied the renderer function again and now it works well.
{
xtype: 'rownumberer',
renderer: function (v, p, record, rowIndex) {
if (this.rowspan) {
p.cellAttr = 'rowspan="' + this.rowspan + '"';
}
return rowIndex + 1;
}
},