Page 1 of 1

Hide one option of DropDownButtons in Master Detail Listpage

Posted: Wed Apr 10, 2024 6:14 am
by onoboa

Grettings,

I have a Master/Detail page, in the list page I have a dropdown button with two options, edit master/detail record and view master/detail record.

I want remove edit option based in an condition for the records.

I have try

$this->ListOptions["details"]->Body = "";

But this remove two options

When I try

$this->ListOptions["details"]->Items["edit"]->Visible = false;

Send me an error.

What is the correct method for hide one of two options?

Thanks,

Omar


Re: Hide one option of DropDownButtons in Master Detail Listpage

Posted: Wed Apr 10, 2024 9:23 am
by arbei

You may use var_dump() to see what you can modify first, e.g.
var_dump($this->ListOptions, $this->ListOptions["details"]->Body);


Re: Hide one option of DropDownButtons in Master Detail Listpage

Posted: Wed Apr 17, 2024 5:41 am
by onoboa

I get the control of visibility options for DropdownButtons with

List Page-> ListOptions_Rendering:

$GLOBALS["receta"]->DetailEdit = !($this->idventa->CurrentValue > 0);

Thanks,

Omar