public function format_row($row) {
        if ($this->rownum < 0) {
            $this->rownum = $this->currpage * $this->pagesize;
        } else {
            $this->rownum += 1;
        }

        return parent::format_row($row);
    }
public function format_row($row) {
        if ($this->rownum < 0) {
            $this->rownum = $this->currpage * $this->pagesize;
        } else {
            $this->rownum += 1;
        }

        return parent::format_row($row);
    }
public function format_row ( $ row ) { if ( $ this -> rownum < 0 ) { $ this -> rownum = $ this -> currpage * $ this -> pagesize ; } else { $ this -> rownum += 1 ; } return parent :: format_row ( $ row ) ; }
Before adding each row to the table make sure rownum is incremented.

@param array $row row of data from db used to make one row of the table.
@return array one row for the table
Before adding each row to the table make sure rownum is incremented .