Page 1 of 1

Readonly - GridAdd / Add

Posted: Sun Mar 24, 2024 9:12 pm
by shahparzsoft

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


Re: Readonly - GridAdd / Add

Posted: Sun Mar 24, 2024 10:47 pm
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;