Well, it could be ordering. Dependencies in javascript are difficult. You 
may want to use RequireJS. What's probably happening is that this script is 
running before jqx-all is loaded completely.

You might also change your $(document).ready() into $(window).load() to 
give the rest of the files a chance to load.

Here's your javascript with the changes I suggested, jslinted and 
beautified...

$(window).load(function() {
    var data = '{{=XML(df_drill_asr_to_json)}}',
        source = {
            datatype: "json",
            datafields: [{
                name: 'Event type',
                type: 'string'
            }, {
                name: 'Descriptor',
                type: 'string'
            }, {
                name: 'Risk',
                type: 'string'
            }, {
                name: 'ASR title',
                type: 'string'
            }, {
                name: 'Phase',
                type: 'string'
            }, {
                name: 'Date',
                type: 'date'
            }, {
                name: 'Flight',
                type: 'string'
            }, {
                name: 'Dep',
                type: 'string'
            }, {
                name: 'Arr',
                type: 'string'
            }],
            localdata: data
        },
        dataAdapter = new $.jqx.dataAdapter(source);
    $("#jqxgrid").jqxGrid({
        width: 850,
        source: dataAdapter,
        columnsresize: true,
        sortable: true,
        filterable: true,
        showfilterrow: true,
        columns: [{
            text: 'Event type',
            datafield: 'Event type'
        }, {
            text: 'Descriptor',
            datafield: 'Descriptor'
        }, {
            text: 'Risk',
            datafield: 'Risk'
        }, {
            text: 'ASR title',
            datafield: 'ASR title'
        }, {
            text: 'Phase',
            datafield: 'Phase'
        }, {
            text: 'Date',
            datafield: 'Date'
        }, {
            text: 'Flight',
            datafield: 'Flight'
        }, {
            text: 'Dep',
            datafield: 'Dep'
        }, {
            text: 'Arr',
            datafield: 'Arr'
        }]
    });
});




On Wednesday, January 7, 2015 2:18:29 AM UTC-7, ArtDijk wrote:
>
> I see via the browser network activities that jqx-all.js is loaded. It is 
> located in the static/js folder. 
> The json file does not contain a singlequote. I hardcopied the json into a 
> html page with this grid and that worked ok.
>
>

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to