This is a migrated thread and some comments may be shown as answers.

RadContextMenu for RadGrid on UserControl Loaded Dynamically

4 Answers 106 Views
Menu
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 15 Jul 2008, 07:41 PM
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

4 Answers, 1 is accepted

Sort by
0
Accepted
Erjan Gavalji
Telerik team
answered on 17 Jul 2008, 08:58 AM
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
0
John
Top achievements
Rank 1
answered on 17 Jul 2008, 12:10 PM
Thanks, Erjan. I'll give it a try today.

John D
0
Vimala
Top achievements
Rank 1
answered on 02 Jul 2015, 12:20 PM
Please give me answer for above question. I have same problem...
0
Dimitar
Telerik team
answered on 07 Jul 2015, 08:03 AM
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
Tags
Menu
Asked by
John
Top achievements
Rank 1
Answers by
Erjan Gavalji
Telerik team
John
Top achievements
Rank 1
Vimala
Top achievements
Rank 1
Dimitar
Telerik team
Share this question
or