RadContextMenu for RadGrid on UserControl Loaded Dynamically

5 posts, 1 answers
  1. John
    John avatar
    6 posts
    Member since:
    Mar 2008

    Posted 15 Jul 2008 Link to this post

    I need a solution to work for a dynamically loaded user control that contains the grid and the context menu. When using...

    ClientEvents OnRowContextMenu="RowSelected" />

    ... and having the javascipt method embedded on the .ascx, the application throws error "RowSelected is undefined." I read on another post to use RegisterClientScriptBlock in the user control code behind which does get works for getting the RowSelected method recognized; however, the .show method of the context menu is undefined. When I code the following using RegisterClientScriptBlock, I get the undefined error for .show()

    "<%= GridContextMenu.ClientID %>").show(args.get_domEvent());

    ...so I then tried...


    + GridContextMenu.ClientID + "');

    ...which didn't work either.

    So, the back to the original question: How do I get a context menu to work for a rad grid that is on a dynamically loaded user control?

    I thought I'd make this a Post. I had asked the question in a reply to another Post, which may have not been appropriate.


    Thanks for any help!

    John D

  2. Answer
    Erjan Gavalji
    Erjan Gavalji avatar
    1455 posts

    Posted 17 Jul 2008 Link to this post

    Hi John,

    I replied to the other thread with a small demo page.

    Looking forward to your reply,
    Erjan Gavalji
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. John
    John avatar
    6 posts
    Member since:
    Mar 2008

    Posted 17 Jul 2008 Link to this post

    Thanks, Erjan. I'll give it a try today.

    John D
  4. Vimala
    Vimala avatar
    1 posts
    Member since:
    Dec 2014

    Posted 02 Jul 2015 in reply to Erjan Gavalji Link to this post

    Please give me answer for above question. I have same problem...
  5. Dimitar
    Dimitar avatar
    409 posts

    Posted 07 Jul 2015 Link to this post


    I have attached the sample project that was marked as an answer of this thread.

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Back to Top