2

I'm trying to display my cities node property in listView (in umbraco backoffice). Each 'city' node hold 'country' node property (the property type is- Content Picker). In list view, if i choose 'Columns Displayed' of type country, i'm getting the country node id, and if i'm choose 'Columns Displayed' of type CountryName (i have this prop in country node..) i'm getting an empty column.

enter image description here

Any Ideas how to get the country name (or any other property in related object) ???

Jarufi
  • 308
  • 1
  • 12
  • Are you talking about the backoffice Child items tab? Can you add a screenshot to your question? – elolos Feb 29 '16 at 13:47
  • Hi elolos I added a picture – Jarufi Mar 06 '16 at 13:39
  • Thanks, it makes sense now. What do you expect CountryName to show though, I see that the parent node's name is Thailand, would that be the same? – elolos Mar 06 '16 at 13:51
  • yes, i want to show parent name or property name.. city has property node of type 'airport' and each airport have a name – Jarufi Mar 06 '16 at 14:54

1 Answers1

1

A good way that i found is to add 'property index' to the node and then i can show him.

in the "GatheringNodeData" override function i take the node (in my case it's city) and add him the country name

e.Fields.Add("countryName",oNode.Parent.GetProperty("Name").Value.ToString());

Next i can just call to the property "countryName" in city.

I'm Hope it's helps others

Jarufi
  • 308
  • 1
  • 12