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

$find("RadContextMenu1") undefined

1 Answer 44 Views
Menu
This is a migrated thread and some comments may be shown as answers.
Jack Liao
Top achievements
Rank 1
Jack Liao asked on 23 Dec 2011, 10:52 AM
Hi
I am encountered js problem when I use below client API.
 Does anyone can help me? thanks.

Case 1
var cMenu = $find("RadContextMenu1");
cMenu will be undefined!!

Case 2
var cMenu2 = $find("<%=RadContextMenu1.ClientID %>");
this is working.

but I would like to use the Case 1, due to I can pass the control's id into another function as a paramter in order to do more complex task and this way should be more fexible.

My developing environment as below.
VS2008 version 9.0.30729.1 SP
.NET Framework 3.5 SP1
telerik version is '2010.1.309.35'

Thank you!

1 Answer, 1 is accepted

Sort by
0
Princy
Top achievements
Rank 2
answered on 23 Dec 2011, 12:32 PM
Hello,

You can access the ContextMenu using ClientID property as explained in this documentation.
Client-Side Basics

Thanks,
Princy.
Tags
Menu
Asked by
Jack Liao
Top achievements
Rank 1
Answers by
Princy
Top achievements
Rank 2
Share this question
or