0

We have a termset with parent term name "State" and with child term "City". I want to show all child terms "City" in a dropdownlist. Who can I retrive only child terms from this termset?

1 Answer 1

1

you need to first finding the termset "State".

for ex: TaxonomySession session = new TaxonomySession(SPContext.Current.Site); // Get a reference to the store TermStore store = session.TermStores[_tTaxonomyField.SspId];

      TermSet _termSet = store.GetTermSet(_tTaxonomyField.TermSetId);

       foreach (Term termSet in _termSet.Terms)
        {
             // all child term found here
        }

hope this help.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.