Quantcast
Channel: SharePoint 2013 - Development and Programming forum
Viewing all articles
Browse latest Browse all 25064

apply CSS to single term, termsets in a my taxonomy control

$
0
0

hi,

am using the below code to iterate through the termset and term in my MMS  serv appln within my  taxonomy tagging control in my visual web part.

here my reqmnt is if the current loggeduser doesnt mapped to the termset-->term-->term ==A-->aA->aaA

i want to hide other termsets - say B-->bB-->bbB, C-->cC-->ccC etc in the group.

and only  show the A-->aA->aaA. Everything else should be hidden.

so i am trying to apply CSS like hidden / display attributes to this term.

but iam not seeing any  property to set this.

can anyone help here to set/ apply CSS .show/hide the Terms.

if (taxonomyGroup.TermSets.Count > 0)
            {

                string tempstormname = string.Empty;
                string tempstormname2 = string.Empty;

                foreach (TermSet singletermset in taxonomyGroup.TermSets)
                {
                    if (singletermset.Name == "A")
                    {
                        TermCollection termsCollection = singletermset.Terms;
                        foreach (Term singleterm in termsCollection)
                        {
                            if (singleterm.Name.Equals("aA"))
                            {
                                foreach (Term mychildTerm in singleterm.Terms)
                                {
                                    Label2.Text = tempstormname + mychildTerm.Name + "---";

                                    foreach (Term mychildTerm2 in mychildTerm.Terms)
                                    {
                                        Label1.Text = tempstormname2 + mychildTerm2.Name + "---";

                                        if (mychildTerm2.Name.Equals("aaA"))
                                        {
                                             //mychildTerm2.Name.
                                            Label1.Text = mychildTerm2.Name.ToString();

                                        }
                                    }


Viewing all articles
Browse latest Browse all 25064

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>