Example #1
0
 protected function dtgCategory_Bind()
 {
     $objExpansionMap[Category::ExpandCreatedByObject] = true;
     // Get Total Count b/c of Pagination
     $this->dtgCategory->TotalItemCount = Category::CountAll();
     if ($this->dtgCategory->TotalItemCount == 0) {
         $this->dtgCategory->ShowHeader = false;
     } else {
         /*				$objClauses = array();
         				if ($objClause = $this->dtgCategory->OrderByClause)
         					array_push($objClauses, $objClause);
         				if ($objClause = $this->dtgCategory->LimitClause)
         					array_push($objClauses, $objClause);
         				if ($objClause = QQ::Expand(QQN::Category()->CreatedByObject))
         					array_push($objClauses, $objClause);
         				$this->dtgCategory->DataSource = Category::LoadAll($objClauses);
         				$this->dtgCategory->ShowHeader = true;*/
         $this->dtgCategory->DataSource = Category::LoadAllWithCustomFields($this->dtgCategory->SortInfo, $this->dtgCategory->LimitInfo, $objExpansionMap);
         $this->dtgCategory->ShowHeader = true;
     }
 }