Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
755
Virtual Scrolling IE8 limit
posted

I use VirtualScrolling to display 5'000'000 products. However in IE8 I can only scroll to the 53687th product. I did some debugging and found out that IE8 has limited the maximum height of an HTML element. In IE8 height is limited to 1342177.27 pixels. (My avarage row height is 25 pixels).

Can you solve the problem or provide a workaround?

  • 14049
    Offline posted

    IE8 has that limitation. So we cannot use one element stretched to any height larger than 1.3 million pixels.

    We're working on another solution for IE8. Thank you for reporting.

  • 395
    posted

    That would be a tough one to fix. I know what the *general* approach would be, but it might be a lot of Infragistics innards to muck about with.

    You almost need to add some property on the JavaScript side to your grid. There is an igtbl_Grid.getDefaultRowHeight function which pulls out the DefaultRowHeight of the Bands, or defaults to 22. Since this function is used in a lot of height determinations, you might want to do something like be able to return this as 1 instead.

    Then you could do something like:

    function overrideGridRowHeightDetermination() {
        // Override the grid's getDefaultRowHeight which includes 2 extra hardcoded pixels
        igtbl_Grid.prototype["getDefaultRowHeight"] =
            function() {
                if (this.HugeRows)
                    return 1;
                var rh = igtbl_parseInt(this.Bands[0].DefaultRowHeight);
                if (!rh)
                    rh = 22;
                return rh;
            }
    }

    ...and run overrideGridRowHeightDetermination in your web page's JavaScript. If you knew the number of rows was getting huge, setting grid.HugeRows = 1; in your AJAX code might be able to hide from that limit.

    You might even be able to use floating-point, but that might have more knock-on effects than you want to deal with. You wouldn't want to set it too early, though, because you would probably not get a scroll bar at all unless the rows*getDefaultRowHeight surpassed the size of the screen.

    I'm not sure this approach would exactly work, because I don't know what else might be relying on the row height presumption, but I figured nobody else gave your question a crack and you might want to give it a shot :)