Ah! The whole site is built around a main layout that adds any number of partials as described by the viewmodel passed in. I'm assuming that the default RenderMode is AddTo? If it can be removed, how? Will it break the whole site if removed or changed?
Is there another way of creating the equivalent of the output of the function :-
<script>
@Html.Raw(RenderDropZonesAndProxy())
</script>
At the moment I'm trying to progress by using a copy and paste of the output obtained by a "view source" of the example :-
<script>
new Ext.net.ProxyDDCreator({ target: "dd1-ct", config: { ddGroup: "group" }, type: Ext.dd.DropZone });
new Ext.net.ProxyDDCreator({ target: "dd2-ct", config: { ddGroup: "group" }, type: Ext.dd.DropZone });
new Ext.net.ProxyDDCreator({ target: "dd1-item1", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd1-item2", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd1-item3", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd1-item4", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd1-item5", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item1", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item2", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item3", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item4", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item5", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item6", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item7", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item8", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
new Ext.net.ProxyDDCreator({ target: "dd2-item9", group: "group", config: { endDrag: endDrag, onDragOut: onDragOut, onDragOver: onDragOver, startDrag: startDrag }, type: Ext.dd.DDProxy });
</script>
I need to create this dynamically as the number of ddGroups and contained items will be dictated by the viewmodel data.