Readonly - GridAdd / Add

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

Readonly - GridAdd / Add

Post by shahparzsoft »

I want to make a column Readonly at the time of Add / GridAdd.
How can i do that ?


mobhar
User
Posts: 11725

Post by mobhar »

For Grid-Add mode, then you may put the following code in Page_Load server event that belongs to the List Page, for example, from demo2024 project, you want to disable CompanyName field:

if ($this->CurrentAction == "gridadd") {
    $this->CompanyName->ReadOnly = true;
}

For single Add Page, then you may simply put the following code in Page_Load server event that belongs to the Add Page:

$this->CompanyName->ReadOnly = true;

Post Reply