protected function dtgProjects_Bind()
 {
     // We must first let the datagrid know how many total items there are
     $this->dtgProjects->TotalItemCount = Project::QueryCount($this->dtgProjects->Conditions);
     // Next, we must be sure to load the data source, passing in the datagrid's
     // limit info into our loadall method.
     $this->dtgProjects->DataSource = Project::QueryArray($this->dtgProjects->Conditions, QQ::Clause($this->dtgProjects->OrderByClause, $this->dtgProjects->LimitClause));
 }
 protected function dtgProjects_Bind()
 {
     $this->dtgProjects->TotalItemCount = Project::QueryCount(QQ::All());
     // If a column is selected to be sorted, and if that column has a OrderByClause set on it, then let's add
     // the OrderByClause to the $objClauses array
     if ($objClause = $this->dtgProjects->OrderByClause) {
         $objClauses[] = $objClause;
     }
     // Add the LimitClause information, as well
     if ($objClause = $this->dtgProjects->LimitClause) {
         $objClauses[] = $objClause;
     }
     $this->dtgProjects->DataSource = Project::LoadAll($objClauses);
 }