Name of controls when using javascript find$

5 posts, 0 answers
  1. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 08 Aug 2008 Link to this post

    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?

  2. Paul
    Admin
    Paul avatar
    4281 posts

    Posted 08 Aug 2008 Link to this post

    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.

  3. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 08 Aug 2008 Link to this post

    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 '

  4. Veselin Vasilev
    Admin
    Veselin Vasilev avatar
    2992 posts

    Posted 08 Aug 2008 Link to this post

    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.
  5. Bob
    Bob avatar
    55 posts
    Member since:
    Apr 2008

    Posted 08 Aug 2008 Link to this post

    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?

Back to Top