I have created a custom DataListSource which works but I would like to be able to populate the data when "GetItems" is called in response to a page "Save" (PostSave?)
However, there does not appear to be an obtainable Umbraco context nor can I get the content Id from the Url.
I am trying to get a value from another data element on the page and use it in the query for this DataListSource.
It may be that what I am trying to do is impossible, but I thought I'd ask :-)
I've never attempted it myself, so I don't have a workable answer for you.
I'm wondering if it's possible to (inject and) use the IRequestAccessor to see if there are other values in the POST payload that could be used? But it'd mostly be guesswork and lots of trial & error.
Custom DataListSource populate on "PostSave"
I have created a custom DataListSource which works but I would like to be able to populate the data when "GetItems" is called in response to a page "Save" (PostSave?)
However, there does not appear to be an obtainable Umbraco context nor can I get the content Id from the Url.
I am trying to get a value from another data element on the page and use it in the query for this DataListSource.
It may be that what I am trying to do is impossible, but I thought I'd ask :-)
Hi Gordon,
I've never attempted it myself, so I don't have a workable answer for you.
I'm wondering if it's possible to (inject and) use the
IRequestAccessor
to see if there are other values in the POST payload that could be used? But it'd mostly be guesswork and lots of trial & error.Cheers,
- Lee
is working on a reply...