This is a migrated thread and some comments may be shown as answers.

Bugs Client Side Api: findItemByText()

1 Answer 61 Views
RibbonBar
This is a migrated thread and some comments may be shown as answers.
A. Drost
Top achievements
Rank 1
A. Drost asked on 26 Mar 2011, 05:38 PM
In the client-side api of the (very nice btw!) RibbonBar I found a bug.

<telerik:RadRibbonBar ID="rrbEditor" OnClientButtonClicked="rrbEditor_onClientButtonClicked" OnClientButtonToggled="rrbEditor_onClientButtonClicked" OnClientMenuItemClicked="rrbEditor_onMenuItemClicked">
   <telerik:RibbonBarTab Text="Handy">
      <telerik:RibbonBarGroup Text="Clipboard">
         <Items>
            <telerik:RibbonBarMenu Size="Large" Text="Paste" ImageUrl="../../Images/Telerik/icons/editorimages/Paste.png">
           </Items>
      </telerik:RibbonBarGroup>
    </telerik:RibbonBarTab>  
    <telerik:RibbonBarTab Text="Layout">
       <telerik:RibbonBarGroup Text="Font">
         <Items>
            <telerik:RibbonBarButtonStrip>
               <Buttons>
                  <telerik:RibbonBarToggleButton Size="Small" Text="Bold" ImageUrl="../../Images/Telerik/icons/editorimages/Bold.png" />
               </Buttons>
            </telerik:RibbonBarButtonStrip>
         </Items>
      </telerik:RibbonBarGroup>
   </telerik:RibbonBarTab>
</telerik:RadRibbonBar>

As you can see, this RibbonBar has two tabs. However when we use the findItemByText() method:

var ribbonBar = $find("<%= rrbEditor.ClientID %>");
var Bold = ribbonBar.findItemByText("Bold");
var Paste = ribbonBar.findItemByText("Paste");

You will find Bold == null while Paste is an item. However if we swap the two tabs (So 'Layout' will be the first tab), now Bold is an item and Paste == null.

So findItemByText() only looks in the first tab.

Hope you can fix this.

1 Answer, 1 is accepted

Sort by
0
Simon
Telerik team
answered on 28 Mar 2011, 05:19 PM
Hello A. Drost,

Thank you for reporting this bug.

We will fix it immediately. You can follow the release notes of the internal builds if you want to upgrade before the Service Pack.

I updated your Telerik points for the report.

Regards,
Simon
the Telerik team
Tags
RibbonBar
Asked by
A. Drost
Top achievements
Rank 1
Answers by
Simon
Telerik team
Share this question
or