I have a new item form (masterdata) which should have several sub items that are stored in another list. The sub items should be entered using grid view and linked to ne newly created item.
My approach is to create a guid on the new form and fill it in a hidden field of the new form. Then also add this guid to every item that is added to the grid view in the same manner.
The first part works fine. I created a jslink for the second part, that updates the values and it is displayed correctly. But if I enter the guid field its empty - and so is the data saved for the field.
The GUID gets populated (and its also in the js object)

But as soon as I click on the field it shows the "real" value which is empty

Looking through the web I found this reference where someone said it would not be possible to set values with code because of the way jsgrid works.
But I also found this example on how to modify and enhance the jsgrid. As far as my understanding is, with a little effort it should be possible to modify the jsgrid to be able to change the values in the grid with javascript.
Sadly I am not so deep in developing that I knew how to do it - hopefully someone with more skills in this area could help me? Maybe just a kickstart, so I can do the rest for myself.
editorInstance.SetValue = function (value) {}, then you check whether the grid is in edit modeif (cellContext.inGridMode === true)and you set the value. Ignore the rest of the code in that function as it only checks if the user has permissions to edit the value. Hope this helps.