0

Using telerik and the radmenu, do you know how to check if the item exists by text

my menu contains the text "menu1"

If I use menu.FindItemByText("menu1").Enabled = False this will disable the button

BUT

If I use menu.FindItemByText("menuTEST").Enabled = False then I get an exception as this button does not exist.

How do I stop the error?

I tried this below but it say it cant return booloen

If menu.FindItemByText("menuTEST") then

'do this

End If
Hello-World
  • 9,277
  • 23
  • 88
  • 154

1 Answers1

1

Try this:

If Not(menu.FindItemByText("menuTEST") Is Nothing) then

    'do this

End If
JMK
  • 27,273
  • 52
  • 163
  • 280