Dropdown Master-Detail Button

This public forum is for user-to-user discussions of PHPMaker. Note that this is not support forum.
Post Reply
ach8
User
Posts: 174

Dropdown Master-Detail Button

Post by ach8 »

How to dropdown master-detail button only?

I found this,
$this->ListOptions->UseButtonGroup = TRUE;
$this->ListOptions->UseDropDownButton = TRUE;
how to separate the actions and details button ?
please help me

thanks,


danielc
User
Posts: 1601

Post by danielc »

If you mean the "master/detail add" button next to "action" button, it is:
$this->OtherOptions["detail"] for master/detail add
$this->OtherOptions["action"] for action

You can put your code in Page_Render server event to manipulate the item's ShowInDropDown attribute like:
$item->ShowInDropDown = FALSE;

See Server event and CLient script in help file.


Webmaster
User
Posts: 9427

Post by Webmaster »

ach8 wrote:
how to separate the actions and details button ?

Use ListOptions_Load server event, see Server Events and Client Scripts in the help file and read the note.


ach8
User
Posts: 174

Post by ach8 »

I try this :

function Page_Render() {
//echo "Page Render";
$this->ListOptions->UseButtonGroup = TRUE;
if($this->OtherOptions["detail"]){
$this->ListOptions->UseDropDownButton = TRUE;
} else if($this->OtherOptions["action"]) {
$this->ListOptions->UseDropDownButton = FALSE;
}
}

results of above code : all button into dropdown

And then i try this,

function ListOptions_Load() {

$this->ListOptions->UseButtonGroup = TRUE;
if($this->ListOptions->Item["details"]){
	$this->ListOptions->UseDropDownButton = TRUE;
} else {
	$this->ListOptions->UseDropDownButton = FALSE;
}

}

Notice: Undefined property: cListOptions::$Item in...


Post Reply