【问题标题】:rad menu , check if item text existsrad 菜单,检查项目文本是否存在
【发布时间】:2013-08-08 10:02:01
【问题描述】:

使用telerik和radmenu,你知道如何通过文本检查项目是否存在

我的菜单包含文本“menu1”

如果我使用 menu.FindItemByText("menu1").Enabled = False 这将禁用按钮

但是

如果我使用menu.FindItemByText("menuTEST").Enabled = False,则会收到异常,因为此按钮不存在。

如何停止错误?

我在下面试过了,但它说它不能返回 booloen

If menu.FindItemByText("menuTEST") then

'do this

End If

【问题讨论】:

    标签: vb.net telerik radmenu


    【解决方案1】:

    试试这个:

    If Not(menu.FindItemByText("menuTEST") Is Nothing) then
    
        'do this
    
    End If
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-05-20
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2018-12-25
      • 2016-02-26
      相关资源
      最近更新 更多