Record Count for Master/Detail-View/Add

Post Reply
digitalphotoworld
User
Posts: 416
Location: Nürnberg/Germany

Record Count for Master/Detail-View/Add

Post by digitalphotoworld »

Please add a feature to enable the Record Count for Master-Detail on view and add-pages. In list pages the record count is displayed on the tabs for detail pages, but not in view and add.


rrezende
User
Posts: 15

Post by rrezende »

Try this.

//Page Data Rendering event view master page
function Page_DataRendering(&$header) {
// get tables separated by comma and explode in vector
$details = explode(',',$_GET['showdetail']);

for($i = 0; $i < count($details); ++$i) {
		// name of the method that searches the number of records per table detail "cvfisicoquimico" "_ Count" name of the method cvfisicoquimico_Count
		$method= $details[$i].'_Count';
		// mount caption with table name and number of records
		$caption = Language()->TablePhrase($details[$i], "TblCaption").' <span class="label label-info ewDetailCount0">'.$this->$method.'</span>';
		//set new caption
		Language()->setTablePhrase($details[$i], "TblCaption", $caption);
}

}


Webmaster
User
Posts: 9427

Post by Webmaster »

Implemented in v2019. (For Master/Detail-View.)


Post Reply