Hi,
I have a situation where I need to set the strikeout value of certain nodes based on an active property. I haven't been able to find any examples of how to do this, and the below code doesn't seem to be working. Can someone please point me in the right direction?
Private Function CreateTreeNode(ByVal key As String, _ ByVal value As String, _ ByVal isGroup As Boolean, _ ByVal isActive As Boolean) As UltraTreeNode Dim newNode As UltraTreeNode newNode = New UltraTreeNode(key, value) If key = TreatmentTreeController.StaticNodeKey.OptionGroup Or key = TreatmentTreeController.StaticNodeKey.SingleTreaments Then newNode.LeftImages.Add(My.Resources.TreatmentType) Else If isGroup Then newNode.LeftImages.Add(My.Resources.OptionGroupTreatment) Else 'This must be a single treatment newNode.LeftImages.Add(My.Resources.SingleTreatment) End If End If If Not isActive Then 'Strikeout any diabled nodes newNode.Override.NodeAppearance.Data.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.True End If Return newNode End Function
Thanks.
Change:
newNode.Override.NodeAppearance.Data.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.True
to:
newNode.Override.NodeAppearance.FontData.Strikeout = Infragistics.Win.DefaultableBoolean.True
(I took out the work "Data")
Worked like a charm.
Thanks Mike!