jQWidgets Forums

jQuery UI Widgets Forums Grid Scrollbars in grid don't have arrorws?

This topic contains 1 reply, has 1 voice, and was last updated by  MatthewV 9 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Scrollbars in grid don't have arrorws? #81413

    MatthewV
    Participant

    I am trying to test out the jQWidgets Grid and when I took the sample code I was able to get the grid rendered and data displaying but both the horizontal and vertical scrollbars don’t have the up/down and left/right arrows. You can see a screen shot of this here: http://s22.postimg.org/snw5yb8u9/Capture.png

    I have tested this in IE 11 and Chrome. I have tried removing my site’s custom CSS files as well as normalizer but that did not affect anything. Here is my code

    CSS/JS files in head:

            <link rel="stylesheet" type="text/css" href="https://cdnjs.cloudflare.com/ajax/libs/normalize/3.0.3/normalize.min.css" />
            <script type="text/javascript" src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.0/jquery.min.js"></script>
    
            
    
            
        <link href="/CSS/Site.css" rel="stylesheet" />
        <link href="/CSS/NavigationMenu.css" rel="stylesheet" />
        <link href="/CSS/jqx.base.css" rel="stylesheet" />
        
    
        <script src="/JavaScripts/jquery.easymenu.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxcore.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxdata.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxbuttons.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxscrollbar.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxmenu.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxgrid.js"></script>
        <script src="/JavaScripts/jQWidgets/jqxgrid.selection.js"></script>

    The Divs and JS code for grid:

    <div id='jqxWidget'>
        <div id="jqxgrid">
            <script type="text/javascript">
            $(document).ready(function ()
            {
                // prepare the data
                var data = new Array();
    
                var firstNames =
                [
                    "Andrew", "Nancy", "Shelley", "Regina", "Yoshi", "Antoni", "Mayumi", "Ian", "Peter", "Lars", "Petra", "Martin", "Sven", "Elio", "Beate", "Cheryl", "Michael", "Guylene"
                ];
    
                var lastNames =
                [
                    "Fuller", "Davolio", "Burke", "Murphy", "Nagase", "Saavedra", "Ohno", "Devling", "Wilson", "Peterson", "Winkler", "Bein", "Petersen", "Rossi", "Vileid", "Saylor", "Bjorn", "Nodier"
                ];
    
                var productNames =
                [
                    "Black Tea", "Green Tea", "Caffe Espresso", "Doubleshot Espresso", "Caffe Latte", "White Chocolate Mocha", "Cramel Latte", "Caffe Americano", "Cappuccino", "Espresso Truffle", "Espresso con Panna", "Peppermint Mocha Twist"
                ];
    
                var priceValues =
                [
                    "2.25", "1.5", "3.0", "3.3", "4.5", "3.6", "3.8", "2.5", "5.0", "1.75", "3.25", "4.0"
                ];
    
                for (var i = 0; i < 100; i++)
                {
                    var row = {};
                    var productindex = Math.floor(Math.random() * productNames.length);
                    var price = parseFloat(priceValues[productindex]);
                    var quantity = 1 + Math.round(Math.random() * 10);
                    row["firstname"] = firstNames[Math.floor(Math.random() * firstNames.length)];
                    row["lastname"] = lastNames[Math.floor(Math.random() * lastNames.length)];
                    row["productname"] = productNames[productindex];
                    row["price"] = price;
                    row["quantity"] = quantity;
                    row["total"] = price * quantity;
                    data[i] = row;
                }
    
                var source =
                {
                    localdata: data,
                    datatype: "array"
                };
    
                var dataAdapter = new $.jqx.dataAdapter(source, {
                    loadComplete: function (data) { },
                    loadError: function (xhr, status, error) { }
                });
    
                $("#jqxgrid").jqxGrid(
                {
                    source: dataAdapter,
    
                    columns: [
    
                      { text: 'First Name', datafield: 'firstname', width: 100 },
    
                      { text: 'Last Name', datafield: 'lastname', width: 100 },
    
                      { text: 'Product', datafield: 'productname', width: 180 },
    
                      { text: 'Quantity', datafield: 'quantity', width: 80, cellsalign: 'right' },
    
                      { text: 'Unit Price', datafield: 'price', width: 90, cellsalign: 'right', cellsformat: 'c2' },
    
                      { text: 'Total', datafield: 'total', width: 100, cellsalign: 'right', cellsformat: 'c2' }
    
                    ]
                });
            });
            </script>
        </div>
    </div>
    

    Why are they now showing up and how do I fix this? The demos work find so it has to be something I am missing in my setup.

    Scrollbars in grid don't have arrorws? #81415

    MatthewV
    Participant

    Screwing around a lot and using a different demo from your site I was able to fix this.

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.