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

Prevent multiple rows

1 Answer 46 Views
TabStrip
This is a migrated thread and some comments may be shown as answers.
Chris Owens
Top achievements
Rank 1
Chris Owens asked on 24 Aug 2012, 06:48 PM
I have ScrollChildren set to true but when I get 1 tab past the edge of the screen it automatically wraps and created a new row whenever a tab is added.

I've gone through the forums and only found a suggestion to check the css, which seemed an exceptionally poor answer since it didn't detail what might affect the tabstrip to cause the wrapping.    I've removed the stylesheet anyway, then tried setting width 100%, and so on, including using IE's Developer Tools to inspect the css but I have yet to figure out how to  change it to prevent the new row, especially since the only styles on the element now are the inline ones produced by Telerik's code.

Any suggestions would be very much appreciated.

1 Answer, 1 is accepted

Sort by
0
Chris Owens
Top achievements
Rank 1
answered on 24 Aug 2012, 08:24 PM
I hacked together a quick fix which I'm not happy with (and it's not wholly tested) but figured I'd toss it here in case someone else got stuck like I did and was told to check their css or something... 

The scrolling to the newly created (last) tab isn't working yet, but this seems to get rid of the second row.  Hopefully there'll be a fix sometime that allows the tabstrip to do it on its own.

var myTabStrip = $find(_RadTabStrip1ID);
 var curTSTabsWidth = myTabStrip._getTabsSize(myTabStrip, 'offsetWidth');
    if (myTabStrip._scroller) {
        var curScrlTabsWidth = myTabStrip._scroller._tabsWidth;
        if ((curTSTabsWidth - curScrlTabsWidth) < 350) {
            $($('ul.rtsUL')[0]).css('width', curTSTabsWidth + 350);
            myTabStrip._scroller._tabsWidth = curTSTabsWidth + 350;
            myTabStrip._scroller.repaint
            myTabStrip._scroller.setScrollingLimits(0, curTSTabsWidth + 350)

            var scrollToLoc = 0;
            var lastTab = myTabStrip._allTabs[myTabStrip._allTabs.length - 1]
            scrollToLoc = lastTab._element.offsetLeft - lastTab._element.offsetWidth;

            myTabStrip._scroller._scrollTo(scrollToLoc);
        }
    }

Tags
TabStrip
Asked by
Chris Owens
Top achievements
Rank 1
Answers by
Chris Owens
Top achievements
Rank 1
Share this question
or