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

Bug in RadTabStrip delete() function

2 Answers 59 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
John
Top achievements
Rank 1
John asked on 11 Jul 2011, 10:00 AM
Here's another one...

I have a RadTabStrip with the ScrollChildren property set true, and enough initial items to cause the scroll bar to be visible.

If I now call the delete() function to remove a tab such that a scroll bar is no longer required, the scroll bar stays displayed. Worse still, if the bar were previously scrolled it stays scrolled so you can end up with an apparently empty tabstrip which actually still contains items but they are just scrolled out of view!

Here's a simple snippet that demonstrates this:

<div style="background-color: #cccccc; width: 500px; height: 50px; border: 1px solid black;">
  <telerik:radtabstrip id="rts2" runat="server" ScrollChildren="true">
    <tabs>
      <telerik:radtab text="First Tab" value="Tab1" />
      <telerik:radtab text="Second Tab" value="Tab2" />
      <telerik:radtab text="Third Tab" value="Tab3" />
      <telerik:radtab text="Fourth Tab" value="Tab4" />
      <telerik:radtab text="Fifth Tab" value="Tab5" />
      <telerik:radtab text="Sixth Tab" value="Tab6" />
    </tabs>
  </telerik:radtabstrip>
</div>
<input type="button" value="Remove Tab" onclick="onRemoveTab()" />
 
<script type="text/javascript" language="javascript">
    function onRemoveTab() {
        var tabStrip = $find('rts2');
 
        var tab = tabStrip.get_tabs().getTab(0);
        if (tab)
            tabStrip.get_tabs().remove(tab);
    }

2 Answers, 1 is accepted

Sort by
0
Craig Dobson
Top achievements
Rank 1
answered on 13 Jul 2011, 01:02 PM
Any ideas guys?

Have also raised a ticket on this and could do with some sort of reply as my project has been waiting on this for several days now. 
0
Dimitar Terziev
Telerik team
answered on 14 Jul 2011, 10:03 AM
Hello Craig and John,

As we have already discussed with  Craig in the support ticket which he has submitted, this behavior is due to a bug, which is already logged for fixing.

Regards,
Dimitar Terziev
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
TabStrip
Asked by
John
Top achievements
Rank 1
Answers by
Craig Dobson
Top achievements
Rank 1
Dimitar Terziev
Telerik team
Share this question
or