Trying to access button in Panel Bar Item

3 posts, 0 answers
  1. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 30 Nov 2009 Link to this post

    I am trying to enable/disable a button within a RadPanelItem however the .findControl() method is returning null.

    I can find a Telerik control placed right next to the button just fine.  What the heck is going on here?

    Here is the javascript I am using to get access to the controls.

     

    var panel = $find("RadPanelBar1");  // PANEL

     

     

    var pItem = panel.findItemByText("Record Details"); // PANEL ITEM

     

     

    var lstBasis = pItem.findControl("lstBasis"); // Rad list box is found
    var
    btnUM = pItem.findControl("btnUnfundedMandates"); // BUTTON IN THE PANEL ITEM IS NOT FOUND

     

  2. Shinu
    Shinu avatar
    17764 posts
    Member since:
    Mar 2007

    Posted 01 Dec 2009 Link to this post

    Hello Robert,

    Try the following client side code in order to access the Button placed in the ItemTemplate of RadPenelBar.

    JavaScript:
     
    <script type="text/javascript">
        function disable() {
            var panel = $find('<%= RadPanelBar1.ClientID %>');
            var pItem = panel.findItemByText("Record Details"); // PANEL ITEM
            var btnUnfundedMandates2 = $telerik.findElement(pItem.get_element(), ("btnUnfundedMandates"));
            btnUnfundedMandates2.disabled = true;
        }
    </script>

    -Shinu.
  3. UI for ASP.NET Ajax is Ready for VS 2017
  4. Robert
    Robert avatar
    198 posts
    Member since:
    Aug 2009

    Posted 01 Dec 2009 Link to this post

    Thanks Shinu!  Thats what I was looking for.

    -R
Back to Top