Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
220
Setting the strikeout value of a Node's Text
posted

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.

Parents
  • 469350
    Verified Answer
    Offline posted

    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")

Reply Children
No Data