To add prefiled item with toolbar I can use this code:
@Edit.Toolbar(actions: "new", contentType: "Marker", prefill: new { Position = 65 } )
But If I have player entity with Markers (list of Marker), and want to create toolbar button to create new marker and add it to markers collection. What is the posible way to do that?
In sql you have same parent field or something but here I don't have any ideas where to start.
I also attached 2 screens for better understanding.
Now I have this code for adding custom button, but don't know what javascript to use and how and if this is a right direction...
<ul class="sc-menu" data-toolbar='{
"groups": [{
"buttons": [{
"command": {
"action": "custom",
"customCode": "alert(\"add marker with current time!\")"
},
"icon": "icon-sxc-plus",
"title": "Add marker"
}]
}]
}'></ul>