Instead of a multi-select listbox for many-to-many relations, I prefer a checkbox-including datagrid, like the one used in the example site.
In the metacontrols setup, the metacontrol class that we need to include all the datagrid rendering functions is not a QControl, and as such can't be set as parent of the QDataGrid, or accessed any other way from the QDataGrid's ParseColumnHtml function.
So I did the following:
1) Created a member in QDataGridBase called Owner
2) Set the Owner as part of creating the DataGrid in my MetaControl
3) added $_OWNER = $this->objOwner; to the ParseColumnHtml function
4) Use $_OWNER->lst*_Render($_ITEM) instead of $_FORM->lst*_Render($_ITEM) when creating the columns.
The end result is a datagrid that gets all it's content as part of the generated MetaControl code, and doesn't require additional code on the form itself.
(authored by VexedPanda)