siriok wrote:
$value = ew_ExecuteScalar("SELECT datetm
FROM tmhx
WHERE pid
= ". $rsnew["pid"]);
//datetm -is one field in detail table
There is no $rsnew in list page. You need to add your logic to monitor if user has added on detail record or not. One possible solution is to set session value when user added detail record during Row_Inserting server event. And check this in Page_Render server event in your list page:
if (isset($_SESSION["yourvar"]))
$this->OtherOptions["addedit"]->Items["add"]->Visible = FALSE;
Not sure how long you want to hide the Add button but in this case it is whole session.