Users guide:Using DBGrid

Abstract: DBGrid is a component to show and edit data from a dataset

   Setting the DBGrid Column properties

DBGrid uses a Data Dictionary to get properties for the fields to show. Currently, there are two properties available: displaylabel and displaywidth. Data Dictionaries can live in a database table or in an array, here is sample code to show how to set the Data Dictionary property displaylabel using an array:

 
function Unit306BeforeShow($sender, $params)
{
$prop=array();
$prop['products']['products_id']=array('displaylabel'=>array('ID'));
$prop['products']['products_quantity']=array('displaylabel'=>array('Quantity'));
$this->dboscommerce1->DictionaryProperties=$prop;
}
 
To see a demo using a database click here