Prevent multiple rows

2 posts, 0 answers
  1. Chris Owens
    Chris Owens avatar
    12 posts
    Member since:
    May 2004

    Posted 24 Aug 2012 Link to this post

    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.
  2. Chris Owens
    Chris Owens avatar
    12 posts
    Member since:
    May 2004

    Posted 24 Aug 2012 Link to this post

    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);
            }
        }

  3. UI for ASP.NET Ajax is Ready for VS 2017
Back to Top