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

[Solved] How to get Telerik object inside ascx (using client side)

1 Answer 167 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Frank
Top achievements
Rank 1
Frank asked on 05 Apr 2009, 04:04 AM

----------my aspx page------------------------------------------------------------------------
<%

@ Register TagPrefix="test" TagName="FolderExplorer" Src="~/Controls/SingleLevel.ascx" %>
<body>
......etc
<
test:FolderExplorer ID="folderExplorer" runat="server" />
</body>
--------------------------------------------------------------------------------------------------

---------SingleLevel.ascx----------------------------------------------------------------------
 <telerik:RadContextMenu ID="folderContextMenu" runat="server" MaxDataBindDepth="3">
<Targets>
<telerik:ContextMenuControlTarget ControlID="folderPanelBar" />
</Targets>
<CollapseAnimation Duration="200" Type="OutQuint" />
<Items>
..
</Items>
</t
elerik:RadContextMenu>
----------------------------------------------------------------------------------------------------
Inside SingleLevel.ascx, I have Teleric component with id called "folderContextMenu".

From my asp.net page using client side, I am able to find the component but it does not have all of the function that Telerik provided. I am clueless...any ideas?

var
Folders = <%=((RadContextMenu) folderExplorer.FindControl("folderContextMenu")).ClientID %>;
but Folders does not have any Telerik methods??

Thanks for any feedbacks!

1 Answer, 1 is accepted

Sort by
0
Genady Sergeev
Telerik team
answered on 06 Apr 2009, 08:53 AM
Hello Frank,

As far as I can see there is nothing wrong with your code, this is the correct syntax of obtaining client objects. Which Telerik methods do you lack?  For more information concerning the RadMenu and the RadContextMenu client objects please refer to this help manual. There you can find a list of the methods the client objects provide. For your convenience I have prepared sample demo reproducing your scenario. You can find it as an attachment.

All the best,
Genady Sergeev
the Telerik team

Check out Telerik Trainer , the state of the art learning tool for Telerik products.
Tags
General Discussions
Asked by
Frank
Top achievements
Rank 1
Answers by
Genady Sergeev
Telerik team
Share this question
or