How to access the "Text" property of the RadDock ClientSide

2 posts, 0 answers
  1. hkdave95
    hkdave95 avatar
    245 posts
    Member since:
    Nov 2006

    Posted 09 Jul 2008 Link to this post


    I need to access the "Text" property of serverside RadDock ClientSide.

    How do I do this ?



    dock.get_contentContainer().value ?

    Kind Regards

  2. Sophy
    Sophy avatar
    636 posts

    Posted 10 Jul 2008 Link to this post

    Hi David,

    You can find the DOM element for the content region of the dock with the get_contentContainer method of the RadDock. The text which you set in the Text property of the RadDock is placed in the content container of the control inside a span element (if the corresponding dock does not have any other content, otherwise the set text is ignored). You will need to find this span element with javascript and take its value, e.g.:

    <telerik:raddock id="dock1" runat="server" text="RadDock1"></telerik:raddock> 
    <asp:button id="button" runat="server" text="Click me" onclientclick="alertText();return false;" /> 
    <script type="text/javascript">  
    function alertText()  
        var dock = $find("<%= dock1.ClientID%>");  
        var content = dock.get_contentContainer();  
        var text = $telerik.isIE ? content.childNodes[0].innerHTML : content.childNodes[1].innerHTML;   

    Let us know if you need further assistance.

    Sincerely yours,
    the Telerik team

    Instantly find answers to your questions at the new Telerik Support Center
  3. DevCraft R3 2016 release webinar banner
Back to Top