From your "Cursus" reference selector, you could use the following xpath to restrict the datagrid to show only courses related to the "opl" for the selected "Programma".
[CursusOpl/Opl/ProgrammaOpl = '%CurrentObject%'], where CurrentObject is the Program.
If you have any questions, let me know :-)