Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ToolBar > Find button on toolbar

Not answered Find button on toolbar

Feed from this thread
  • Dmitry Intermediate avatar

    Posted on Dec 9, 2011 (permalink)

    Hello,
    First I tried to access button by its index, i.e. toolbar.getAllItems()[3]. That worked for some time. But when 1st button is not a button but a dropdown with more buttons in it, that method returns wrong button. Next I tried to access buttons by value. That also worked for some time. But on buttons which may contain child items, like RadToolBarDropDown, that method won't work. Now what do I have to do? Search button by text? My buttons don't have a text at all. So what now?

    PLEASE tell me is that a so HUGE problem do add a simple ID property to each button and implement FindButtonByID method? Is that a feature which requires a deep planning? You are developing this control so long and you can't implement this simplest feature? I can't believe that.

    Reply

  • Kate Kate admin's avatar

    Posted on Dec 9, 2011 (permalink)

    Hi Dmitry,

    Can you please clarify if you are trying to find the button on the client-side or on the server side? In case you need on the server side I would suggest that you take a look at the following forum post where it is both explained and exemplified how this could be achieved:
    http://www.telerik.com/community/forums/aspnet-ajax/toolbar/cannot-find-items-in-radtoolbar-when-a-radtoolbardropdown-is-in-the-collection.aspx#1703176 

    Greetings,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

  • Dmitry Intermediate avatar

    Posted on Dec 9, 2011 (permalink)

    That was all on server side. As for your link, RadToolBarDropDown does not have Value property and I cannot find it. Neither I have a text on it, nor I have any url associated with it. That's the button I need to find because I'm going to add child buttons to it at runtime.

    Reply

  • Dmitry Intermediate avatar

    Posted on Dec 13, 2011 (permalink)

    Can you please help me with my issue?

    Reply

  • Kate Kate admin's avatar

    Posted on Dec 13, 2011 (permalink)

    Hi Dmitry,

    You could find the specific button by its index value. For instance using the code below you can set visible false to the first button of the RadToolBar control:
    <telerik:RadToolBar runat="server" ID="toolbar1">
            <Items>
                <telerik:RadToolBarButton Text="button1">
                </telerik:RadToolBarButton>
                <telerik:RadToolBarButton Text="button2">
                </telerik:RadToolBarButton>
            </Items>
        </telerik:RadToolBar>

    protected void Page_Load(object sender, EventArgs e)
       {
           toolbar1.Items[0].Visible = false;
       }

    Best wishes,
    Kate
    the Telerik team
    If you want to get updates on new releases, tips and tricks and sneak peeks at our product labs directly from the developers working on the RadControls for ASP.NET AJAX, subscribe to their blog feed now

    Reply

Back to Top

Skip Navigation LinksHome / Community & Support / Developer Productivity Tools Forums / ASP.NET AJAX > ToolBar > Find button on toolbar
Related resources for "Find button on toolbar"

[   ASP.NET ToolBar Features  |  Documentation  |  Demos  |  Telerik TV   |   Self-Paced Trainer   |  Step-by-step Tutorial  ]