Is there any way to set the CSS class for visited links? I have an inital css class, then it switches to something else for the SelectedCSSClass, but I don't see any way to set the color of the text for a visited link that is not currently selected. (It does not revert back to the original css class.)
Just so you see what I'm talking about, here's one of the nodes...
<ig:DataTreeNode NavigateUrl="mypage.aspx" Target="default_content" Text="Reports" CssClass="MyNodeCSS" SelectedCssClass="MySelectedNodeCSS">
</ig:DataTreeNode
Hello allison_musche,
Thank you for posting in our forum.
You can set a default style for the tree via the CssClass property and add different settings depending on the state of the nodes. For example if you set CssClass="MyNodeCSS" for a node you can then define separate classes for the different states of that node. For example:
.MyNodeCSS
{
color: Red;
}
. MyNodeCSS:visited
color: Green;
.MyNodeCSS:hover
color: Purple;
So the visited links will appear green.
Let me know if you have any questions.
Best Regards,
Maya Kirova
Developer Support Engineer II
Infragistics, Inc.
http://es.infragistics.com/support
Hello allison_musche ,
I’ve tested this on my side with nodes set-up as follows:
However when I tested this the red color was applied when a node was selected.
I’ve tested this using version 13.2.20132.2028 of 13.2. Are you perhaps using a different version?
I’m attaching the sample I used to test this for your reference. Let me know if I’m missing anything from your scenario.
The problem, apparently, is that when you put in the "visited" css (like your original answer), it seems to overwrite the color of the selected style. Use your example and just add this, and you'll see the color won't change. (Or if it does, only for a second.) Is there any way for it to keep the Selected style until you click on a diffferent node??? If you don't set the visitied, it DOES keep the Selected style until you click on a different node - but then it applies the default visited style (mine are hyperlinks, so a different color entirely) and I need them to continue looking like all other "not currently selected" nodes, not like visited hyperlinks.
.MyCSSClass:visited
color: Blue;
I’m just following up to see if you’ve been able to resolve your issue. If you have any questions or concerns or if you need further assistance please let me know.
Developer Support Engineer
Sadly, not really! I sort of abandoned doing the color as it was eating up way more time than it was worth! I did try the !important bit, but it didn't work for me. At least my original issue was resolved though, it's fine for now unless the customer insists on something different. Thanks!
I’m glad to hear you were able to solve your original issue.
If you happen to return to this I’ve attached a sample for your reference where
the selected style has a color set with !important tag which overwrites all other color settings for the selected node in the tree. You can refer to it and let me know if I’m missing anything from your scenario.