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
0
igGrid not displaying when autoGenerateColumns is set to false
posted

Hi,

I have a crazy problem which seems very simple to solve, but after hours spent on it, I think I really need help.

This is my problem : I create a igGrid using a simple HTML table of a few lines (less than 10). I want to define my own width, header, ... When I write code with autoGenerateColumns  set to true, the grid appears, but of course without the appearance.

But when I set autoGenerateColumns  to false, the grid never appears : i just have an animation which never stops.

This is the code I have in my web page :

<table id="grid">
        <thead>
            <tr>
                <th>
                    ID
                </th>
                <th>
                    Name
                </th>
                <th>
                    Number
                </th>
            </tr>
        </thead>
        <tbody>
            <tr><td>1</td><td>Adjustable Race</td><td>AR-5381</td></tr>
            <tr><td>2</td><td>Bearing Ball</td><td>BA-8327</td></tr>
            <tr><td>3</td><td>BB Ball Bearing</td><td>BE-2349</td></tr>
            <tr><td>4</td><td>Headset Ball Bearings</td><td>BE-2908</td></tr>
            <tr><td>316</td><td>Blade</td><td>BL-2036</td></tr>
            <tr><td>317</td><td>LL Crankarm</td><td>CA-5965</td></tr>
            <tr><td>318</td><td>ML Crankarm</td><td>CA-6738</td></tr>
            <tr><td>319</td><td>HL Crankarm</td><td>CA-7457</td></tr>
            <tr><td>320</td><td>Chainring Bolts</td><td>CB-2903</td></tr>
            <tr><td>321</td><td>Chainring Nut</td><td>CN-6137</td></tr>
        </tbody>
    </table>

    <script>    
    $(function () {
        $("#grid").igGrid({  
        colums: [
        {key:'ID', width:'50px', dataType: 'string'},
        {key:'Name', width:'250px', dataType: 'string'},
        {key:'Number', width:'150px', dataType: 'string'}
        ],              
        autoGenerateColumns:false, featureChooserIconDisplay:'always'
        });
    });    
    </script>