protected function dtgFile_Bind() { // Get Total Count b/c of Pagination $this->dtgFile->TotalItemCount = File::CountAll(); $objClauses = array(); if ($objClause = $this->dtgFile->OrderByClause) { array_push($objClauses, $objClause); } if ($objClause = $this->dtgFile->LimitClause) { array_push($objClauses, $objClause); } $this->dtgFile->DataSource = File::LoadAll($objClauses); }