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()

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

    ...so I then tried...

    document.getElementById('"

    + 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.

    http://www.telerik.com/community/forums/thread/b311D-bbktgd.aspx

    Thanks for any help!

    John D

  2. Answer
    Erjan Gavalji
    Admin
    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. UI for ASP.NET Ajax is Ready for VS 2017
  4. 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
  5. 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...
  6. Dimitar
    Admin
    Dimitar avatar
    281 posts

    Posted 07 Jul 2015 Link to this post

    Hello,

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

    Regards,
    Dimitar
    Telerik
    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
UI for ASP.NET Ajax is Ready for VS 2017