Welcome Guest Search | Active Topics | Sign In | Register

How To: Use the NavigationItemImages object in conjunction with MenuItem.LeftIcon Options
Joan Darling
Posted: Tuesday, March 9, 2010 1:43:19 PM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
I am trying to programatically populate the .LeftIcon property of the MenuItem object. The following code produces an object reference not set error. Can anyone put me on the right track?
Code: Visual Basic.NET
Dim img As EO.Web.NavigationItemImages
img.Url = "~/images/24x24/normal/document.png"

Dim rpts As New clsReports(CType(Session.Item("UserCredentials"), clsLoginCredentials))
For Each rpt As String In rpts.Keys
   If rpts(rpt).ReportIsAuthorized Then
      Dim mi As New EO.Web.MenuItem
       With mi
          .LeftIcon = img
          .Text.Html = rpts(rpt).ReportTitle
          .NavigateUrl = "~/application/reports_jvs.aspx?id=" & rpt
       End With
       Menu.Items(2).SubMenu.Items.Add(mi)
   End If
Next
eo_support
Posted: Tuesday, March 9, 2010 1:56:27 PM
Rank: Administration
Groups: Administration

Joined: 5/27/2007
Posts: 24,194
Hi,

You would do something like

Code: Visual Basic.NET
.LeftIcon.Url = "~/images/24x24/normal/document.png"


Thanks!
Joan Darling
Posted: Tuesday, March 9, 2010 3:19:44 PM
Rank: Advanced Member
Groups: Member

Joined: 3/9/2010
Posts: 119
Thanks


You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.