RadMenu菜单的父节指定image
dim statusIcon as string="icon.jpg"
If statusIcon <> String.Empty Then
  Dim rootItem As New RadMenuItem
  rootItem.ImageUrl = statusIcon
  rootItem.ToolTip = statusIconText
  rootItem.Attributes("onclick") = "return false;"
  Dim childItem As New RadMenuItem
  childItem.Text = New AOSpine.Business.Terms().GetField("STATUS_PENDING")
  childItem.Value = DirectCast(e.Item.DataItem, DataRowView)("EventNumber").ToString & Systems.SplitString & DirectCast

(e.Item.DataItem, DataRowView)("DayNumber").ToString & Systems.SplitString & DirectCast(e.Item.DataItem, DataRowView)

("ItemNumber").ToString & Systems.SplitString & "STATUS_PENDING"
  rootItem.Items.Add(childItem)
  childItem = New RadMenuItem
  childItem.Text = New AOSpine.Business.Terms().GetField("STATUS_ACCEPTED")
  childItem.Value = DirectCast(e.Item.DataItem, DataRowView)("EventNumber").ToString & Systems.SplitString & DirectCast

(e.Item.DataItem, DataRowView)("DayNumber").ToString & Systems.SplitString & DirectCast(e.Item.DataItem, DataRowView)

("ItemNumber").ToString & Systems.SplitString & "STATUS_ACCEPTED"
  rootItem.Items.Add(childItem)
  childItem = New RadMenuItem
  childItem.Text = New AOSpine.Business.Terms().GetField("STATUS_DECLINED")
  childItem.Value = DirectCast(e.Item.DataItem, DataRowView)("EventNumber").ToString & Systems.SplitString & DirectCast

(e.Item.DataItem, DataRowView)("DayNumber").ToString & Systems.SplitString & DirectCast(e.Item.DataItem, DataRowView)

("ItemNumber").ToString & Systems.SplitString & "STATUS_DECLINED"
  rootItem.Items.Add(childItem)
  DirectCast(e.Item.FindControl("radStatus"), RadMenu).Items.Add(rootItem)
End If

 

posted on 2008-03-06 22:05  风语战士  阅读(472)  评论(0编辑  收藏  举报