Visible Master/Detail View, Edit and Copy buttons

If you don’t need to hide them by code, you may simply use the table settings, i.e. Master/Detail XXX (as Detail), for List page.If you want to hide them by code, make sure you have placed your code in the ListOptions_Rendering server event of master table.As suggested you should check the detail grid class name by comparing the file name of the class. (Do not just and paste examples, you need to modify them to suit the table names of your own project.)

Learn how to debug and learn how to use var_dump() to check your variables.