Get/Set value to ItemTemplate object in RadToolbar

3 posts, 1 answers
  1. Hansik
    Hansik avatar
    23 posts
    Member since:
    Oct 2007

    Posted 24 Feb 2010 Link to this post


       I created a Textbox object as an ItemTemplate for a RadToolBarButton item on my RadToolBar.

       I just need to get its value and also set a new value both on the client side. I found some codes/suggestions here in the forum that access these values, but I think they are all done on the server side. 

      I really appreciate your help!

  2. Answer
    Yana avatar
    4604 posts

    Posted 25 Feb 2010 Link to this post

    Hello Arthur,

    If your RadToolBarButton is something like this:

    <telerik:RadToolBarButton Text="button1">
            <asp:TextBox ID="textBox1" runat="server" />

    you can get the textbox with the following code:

    function getTextBox() {
        var toolbar = $find("<%=toolbar1.ClientID %>");
        var button = toolbar.findItemByText("button1");
        var textBox = button.get_element().firstChild;
        if (textBox.type != "text")
            textBox = textBox.nextSibling;
        textBox.value = "test";

    Best regards,
    the Telerik team

    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
  3. Hansik
    Hansik avatar
    23 posts
    Member since:
    Oct 2007

    Posted 02 Mar 2010 Link to this post

    Thanks, Yana for the suggestion. It works now!!! I really appreciate it!
Back to Top