Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Is there a grid api?
Is it possible to create/update/delete content in a grid with ContentService?
Does anyone have an answer to this?
There is no API, so you have to author the JSON yourself.
Thanks Soren, My main issue is if you say for example use contentservice to get a property value from a grid and then set that value on another property that is a grid datatype it mangles the json so you can't copy grid values from one property to another.
Is there a way around this?
eg if you use something like GetPropertyValue for a grid data type and then use that value to set it on another grid data type via IContent content.SetValue(..., ...)
it won't set it correctly and the grid value is invalid.
I have used the ContentService for populating grid values a few times, but never ran into problems where the json got mangled. Can you give an example of what happened, and what you expected?
I have some custom grid controls as well but I would think copying over json is copying over json.
Hey Tom, are you using V7 or V8? Because I just tested your code in V8 and it worked ok.
v7.8.1 at the moment
is working on a reply...
Write your reply to:
Image will be uploaded when post is submitted