Page 2 of 2

Re: How to modify buttons on list page? (v2022)

Posted: Thu Mar 16, 2023 12:28 pm
by btrade

Yes, I mean it. On the view page. Also on the list page I need to disable the add button. Since I am adding all the entries via master/add .

It's very good work on list page

function ListOptions_Rendered()
{
 $this->ListOptions["details"]->Visible = FALSE; // if you enabled "Multiple detail tables"
}

it doesn't work on the view page.

 function Page_Render()
{  
    $this->OtherOptions["action"]["detail"]->Visible = FALSE;
}

And I don't know how to disable the simple button for adding on the list page. I need only the button of master/add.


Re: How to modify buttons on list page? (v2022)

Posted: Thu Mar 16, 2023 12:38 pm
by mobhar

Re: How to modify buttons on list page? (v2022)

Posted: Thu Mar 16, 2023 6:33 pm
by btrade

Mastrer table - view page.

I added this command but it don't work.

function Page_Load()
{
    $this->ShowMultipleDetails = false;
}

function Page_Render()
{
    $this->OtherOptions["detail"]->add("detail_products")->Body = ""; 
}

Re: How to modify buttons on list page? (v2022)

Posted: Thu Mar 16, 2023 7:10 pm
by mobhar

It should work.

Double check this part: detail_products. Make sure products is your detail table name, and not the master table name.


Re: How to modify buttons on list page? (v2022)

Posted: Thu Mar 16, 2023 7:34 pm
by btrade

Yes, sure it solved.

how to disable the simple button for adding on the list page?


Re: How to modify buttons on list page? (v2022)

Posted: Thu Mar 16, 2023 8:58 pm
by btrade

It works

List page

// Page Data Rendering event
$this->OtherOptions["addedit"]->Items["add"]->Visible = FALSE;