In add master/details, I need to control the detail it must have a item

hiin add master/detail , How can I control the number of detail records?in add master/details, I need to control the detail it must have a item and otherwise the insert operation will be aborted in master.I can check the details items with this code, but the problem is that a record is inserted in the master that has no details.

function Grid_Inserting()
{
   $rsnew = $this->GetGridFormValues();
    
    if ( count($rsnew) < 1){

		return false;
	}

    return true;
}

Note that Grid_Inserting() is a server event for the detail grid, and detail records are inserted after the master record is inserted. You should use Row_Inserting server event of the master table.

How I can check details items In Row_Inserting server event of the master table ?

You may check HTTP response in your browser, see what data is posted to the server from the browser.

I was not aware of this at allThanks for the advice