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

Name of controls when using javascript find$

4 Answers 142 Views
Sharepoint Integration
This is a migrated thread and some comments may be shown as answers.
Bob
Top achievements
Rank 1
Bob asked on 08 Aug 2008, 01:52 PM
I am building a webpart and need to inject some code via RegisterClientScriptBlock.  The webpart creates a tree control, but I don't know what name it is assinged, so I don't know how to address it in a find$ command:

var firstTreeView = $find(""RadTreecontrol1"");


Any ideas?

4 Answers, 1 is accepted

Sort by
0
Paul
Telerik team
answered on 08 Aug 2008, 02:13 PM
Hi Bob,

Please refer to our Client-Side Programming Basics article for details on the matter.

Sincerely yours,
Paul
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bob
Top achievements
Rank 1
answered on 08 Aug 2008, 02:31 PM
How do I know what the ClientID is?  Im creating the control in code, like this.

Dim m_RadTreeFolderHierarchy As New Telerik.Web.UI.RadTreeView '

0
Veselin Vasilev
Telerik team
answered on 08 Aug 2008, 03:07 PM
Hi Bob,

You can set the ID of the treeview in the code behind as below:

Dim m_RadTreeFolderHierarchy As New Telerik.Web.UI.RadTreeView 
m_RadTreeFolderHierarchy.ID = "folderTree" 


Best wishes,
Veskoni
the Telerik team

Check out Telerik Trainer, the state of the art learning tool for Telerik products.
0
Bob
Top achievements
Rank 1
answered on 08 Aug 2008, 03:15 PM

m_RadTreeFolderHierarchy.ID =

"MJNavTree"

The id being generated is:

"ctl00_m_g_357f5b49_c6db_4f75_bd9f_0c09a49ee472_MJNavTree"

So, how do I know the full name prior to RegisterClientScriptBlock?

Tags
Sharepoint Integration
Asked by
Bob
Top achievements
Rank 1
Answers by
Paul
Telerik team
Bob
Top achievements
Rank 1
Veselin Vasilev
Telerik team
Share this question
or