/**
  * @override Calls <DatabaseTable::GetData>() and loops thru the <ResultSet> creating the table content before calling <OVERRIDE::DatabaseTable::PreRender>
  */
 function PreRender($args = array())
 {
     $this->GetData();
     if (!$this->ResultSet || $this->ResultSet->Count() == 0) {
         if (!$this->noDataAsRow) {
             return $this->contentNoData;
         }
         if (!$this->header) {
             if ($this->OnAddHeader) {
                 $this->OnAddHeader[0]->{$this->OnAddHeader[1]}($this, array());
             } else {
                 $this->AddHeader(array());
             }
         }
         $td = $this->SetColFormat(0, "")->NewCell($this->contentNoData);
         $td->colspan = $this->header->GetMaxCellCount();
         $this->HidePager = true;
     } else {
         foreach ($this->ResultSet as $raw_row) {
             $row = $this->_preProcessData($raw_row);
             if (!$this->header) {
                 if ($this->OnAddHeader) {
                     $this->OnAddHeader[0]->{$this->OnAddHeader[1]}($this, array_keys($row));
                 } else {
                     $this->AddHeader(array_keys($row));
                 }
             }
             if ($this->OnAddRow) {
                 $this->OnAddRow[0]->{$this->OnAddRow[1]}($this, $row);
             } else {
                 $this->AddRow($row);
             }
             $this->AddDataToRow($raw_row);
         }
         if ($this->ItemsPerPage) {
             $this->HidePager = false;
         }
     }
     parent::PreRender($args);
 }