API
Version 7.x > API > CurrentDocument.Children.WithAllData is not returning items View modes: 
User avatar
Member
Member
jordan - 1/7/2014 11:36:09 AM
   
CurrentDocument.Children.WithAllData is not returning items
Hello,
CurrentDocument.Children.WithAllData has a count of 0 however CurrentDocument.Children has a count higher than 0.
This would be fine if CurrentDocument.Children.GetStringValue returned the data I needed.

Why would these properties have a different count?
How can I ensure that I obtain the data for the children items.

Please help.

Many thanks.

Jordan

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/8/2014 12:42:11 AM
   
RE:CurrentDocument.Children.WithAllData is not returning items
Hello,

Please see last post in this forum thread.

Best regards,
Juraj Ondrus

User avatar
Member
Member
jordan - 1/8/2014 3:26:31 AM
   
RE:CurrentDocument.Children.WithAllData is not returning items
Thanks for the response.
Alas it does not answer my question.
Having this property in the web config makes no difference to outcome.

Thanks

Jordan

User avatar
Member
Member
jordan - 1/8/2014 4:15:28 AM
   
RE:CurrentDocument.Children.WithAllData is not returning items
Just to clarify
CurrentDocument.Children.WithAllData returns a different number of results to CurrentDocument.Children

I would expect the same number of results from both fields only WithAllData to have additional info.

Thanks

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 1/8/2014 4:50:31 AM
   
RE:CurrentDocument.Children.WithAllData is not returning items
Hello,

What version of Kentico do you use exactly and where and how are you using the code?
I am using latest hotfix and both properties are returning the same number or results for given current document.
To allow it to return values on live site, you have to use the mentioned web.config key, otherwise 0 is always returned.

Best regards,
Juraj Ondrus

User avatar
Member
Member
jordan - 1/8/2014 10:11:45 AM
   
RE:CurrentDocument.Children.WithAllData is not returning items
Sorry, please ignore me.
it was something I was doing wrong.