Create RadContextMenu dynamically

2 posts, 0 answers
  1. johnson lim
    johnson lim avatar
    72 posts
    Member since:
    Feb 2010

    Posted 05 May 2010 Link to this post

    hi, i need to create RadContextMenu dynamically based on user requirement.
    below is my coding:

      Dim cRadMenu As New Telerik.Web.UI.RadContextMenu 
      Dim cRadMenuItem As New Telerik.Web.UI.RadMenuItem 
    Dim imgParameter As New Image 
    Dim cRadMenuItem2 As New Telerik.Web.UI.RadMenuItem 
       cRadMenu.ID = "adasd" & gvDynamic.Rows(i).Cells(iCellIndex).ID 
     imgParameter.Attributes.Add("onclick", "showMenu(event," + cRadMenu.ClientID + ");") 
    but it fail to by giving me error when the page just load:
    The error is  Line :151
                        Char :43
                        Error : Expected ')'

    Does anyone has idea on this ? Can provide me the sample coding  on how to create this dynamically?

  2. Lighthouse Developer
    Lighthouse Developer avatar
    34 posts
    Member since:
    Feb 2010

    Posted 07 May 2010 Link to this post

    Maybe you haven't closed a parenthesis higher up? Which one is line 151?
Back to Top