What is the correct of way of setting a grid value in code? If I set a grid's value with a properly formatted json data, it will save without errors using ApplicationContext.Services.ContentService.SaveAndPublishWithStatus. But once the content is loaded in the back-office the value is not showing up.
I checked the database and the cmscontentxml has the correct value as well. The umbraco.config contains the correct value as well. Even after republishing the entire site, stop and started the service, the grid is empty.
yeah setting grid values is a real pain - there doesn't appear to be any objects you can deserialize too :(
however when i do something similar the only difference i can see is that i have an allowed section in the json - and depending on how umbraco loads the grid that might matter ?
Setting Grid value in code
Hello,
What is the correct of way of setting a grid value in code? If I set a grid's value with a properly formatted json data, it will save without errors using ApplicationContext.Services.ContentService.SaveAndPublishWithStatus. But once the content is loaded in the back-office the value is not showing up.
I checked the database and the cmscontentxml has the correct value as well. The umbraco.config contains the correct value as well. Even after republishing the entire site, stop and started the service, the grid is empty.
This is the content of the grid in umbraco.config
Hi,
yeah setting grid values is a real pain - there doesn't appear to be any objects you can deserialize too :(
however when i do something similar the only difference i can see is that i have an allowed section in the json - and depending on how umbraco loads the grid that might matter ?
is working on a reply...