本文整理汇总了PHP中QQ::Orderby方法的典型用法代码示例。如果您正苦于以下问题:PHP QQ::Orderby方法的具体用法?PHP QQ::Orderby怎么用?PHP QQ::Orderby使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类QQ
的用法示例。
在下文中一共展示了QQ::Orderby方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: dtgAssetTransaction_Create
protected function dtgAssetTransaction_Create()
{
$this->dtgAssetTransaction = new QDataGrid($this);
$this->dtgAssetTransaction->Name = 'Transactions';
$this->dtgAssetTransaction->CellPadding = 5;
$this->dtgAssetTransaction->CellSpacing = 0;
$this->dtgAssetTransaction->CssClass = "datagrid";
// Enable AJAX - this won't work while using the DB profiler
$this->dtgAssetTransaction->UseAjax = true;
// Enable Pagination, and set to 20 items per page
$objPaginator = new QPaginator($this->dtgAssetTransaction);
$this->dtgAssetTransaction->Paginator = $objPaginator;
$this->dtgAssetTransaction->ItemsPerPage = 20;
$this->dtgAssetTransaction->AddColumn(new QDataGridColumn('Transaction Type', '<?= $_ITEM->Transaction->__toStringWithLink() ?>', array('OrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->TransactionType->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->TransactionType->ShortDescription, false), 'CssClass' => "dtg_column", 'HtmlEntities' => false)));
$this->dtgAssetTransaction->AddColumn(new QDataGridColumn('From', '<?= $_ITEM->__toStringSourceLocation() ?>', array('OrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->SourceLocation->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->SourceLocation->ShortDescription, false), 'CssClass' => "dtg_column")));
$this->dtgAssetTransaction->AddColumn(new QDataGridColumn('To', '<?= $_ITEM->__toStringDestinationLocation() ?>', array('OrderByClause' => QQ::Orderby(QQN::AssetTransaction()->DestinationLocation->ShortDescription), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->DestinationLocation->ShortDescription, false), 'CssClass' => "dtg_column")));
$this->dtgAssetTransaction->AddColumn(new QDataGridColumn('User', '<?= $_ITEM->Transaction->CreatedByObject->__toStringFullName() ?>', array('OrderByClause' => QQ::Orderby(QQN::AssetTransaction()->CreatedByObject->LastName), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->CreatedByObject->LastName, false), 'CssClass' => "dtg_column")));
$this->dtgAssetTransaction->AddColumn(new QDataGridColumn('Date', '<?= $_ITEM->Transaction->CreationDate->PHPDate("Y-m-d H:i:s"); ?>', array('OrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate), 'ReverseOrderByClause' => QQ::OrderBy(QQN::AssetTransaction()->Transaction->CreationDate, false), 'CssClass' => "dtg_column")));
$this->dtgAssetTransaction->SortColumnIndex = 4;
$this->dtgAssetTransaction->SortDirection = 1;
$objStyle = $this->dtgAssetTransaction->RowStyle;
$objStyle->ForeColor = '#000000';
$objStyle->BackColor = '#FFFFFF';
$objStyle->FontSize = 12;
$objStyle = $this->dtgAssetTransaction->AlternateRowStyle;
$objStyle->BackColor = '#EFEFEF';
$objStyle = $this->dtgAssetTransaction->HeaderRowStyle;
$objStyle->ForeColor = '#000000';
$objStyle->BackColor = '#EFEFEF';
$objStyle->CssClass = 'dtg_header';
}