From ecef9b11f0f138fd7fc819572b04f8f17df03d8c Mon Sep 17 00:00:00 2001 From: Mike Ho Date: Wed, 30 Jun 2010 11:21:45 -0700 Subject: [PATCH] Added NoDataHtml support to QDataGrid --- includes/qcodo/_core/qform/QDataGridBase.class.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/includes/qcodo/_core/qform/QDataGridBase.class.php b/includes/qcodo/_core/qform/QDataGridBase.class.php index edaa2d4a..dab7e5e2 100644 --- a/includes/qcodo/_core/qform/QDataGridBase.class.php +++ b/includes/qcodo/_core/qform/QDataGridBase.class.php @@ -555,6 +555,13 @@ protected function GetFooterRowHtml() {} protected function GetControlHtml() { $this->DataBind(); + // Render NoDataHtml? + if ((!$this->objDataSource || !count($this->objDataSource)) && + $this->strNoDataHtml) { + $this->objDataSource = null; + return $this->strNoDataHtml; + } + // Table Tag $strStyle = $this->GetStyleAttributes(); if ($strStyle)