QDataGridBase::__construct PHP Method

__construct() public method

public __construct ( $objParentObject, $strControlId = null )
    public function __construct($objParentObject, $strControlId = null)
    {
        try {
            parent::__construct($objParentObject, $strControlId);
        } catch (QCallerException $objExc) {
            $objExc->IncrementOffset();
            throw $objExc;
        }
        $this->objRowStyle = new QDataGridRowStyle();
        $this->objAlternateRowStyle = new QDataGridRowStyle();
        $this->objHeaderRowStyle = new QDataGridRowStyle();
        $this->objHeaderLinkStyle = new QDataGridRowStyle();
        // Labels
        $this->strLabelForNoneFound = QApplication::Translate('<b>Results:</b> No %s found.');
        $this->strLabelForOneFound = QApplication::Translate('<b>Results:</b> 1 %s found.');
        $this->strLabelForMultipleFound = QApplication::Translate('<b>Results:</b> %s %s found.');
        $this->strLabelForPaginated = QApplication::Translate('<b>Results:</b>&nbsp;Viewing&nbsp;%s&nbsp;%s-%s&nbsp;of&nbsp;%s.');
        $this->objColumnArray = array();
        // Setup Sorting Events
        if ($this->blnUseAjax) {
            $this->AddAction(new QClickEvent(), new QAjaxControlAction($this, 'Sort_Click'));
        } else {
            $this->AddAction(new QClickEvent(), new QServerControlAction($this, 'Sort_Click'));
        }
        $this->AddAction(new QClickEvent(), new QTerminateAction());
    }

Usage Example

 /**
  * QDataGrid::__construct()
  *
  * @param mixed  $objParentObject The Datagrid's parent
  * @param string $strControlId    Control ID
  *
  * @throws QCallerException
  * @return \QDataGrid
  */
 public function __construct($objParentObject, $strControlId = null)
 {
     try {
         parent::__construct($objParentObject, $strControlId);
     } catch (QCallerException $objExc) {
         $objExc->IncrementOffset();
         throw $objExc;
     }
     $this->CssClass = 'datagrid';
 }
All Usage Examples Of QDataGridBase::__construct