jQuery UI Widgets Forums Grid IE8 Export Data, Virtual Paging and Filtering

This topic contains 3 replies, has 2 voices, and was last updated by  Peter Stoev 10 years, 5 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author

  • nialliwallace
    Participant

    Hi,
    First post so not sure if I’ve got enough info here,
    I’m unfortunately having to write an IE8 compatible system and one of my requirements is to be able to print the contents of a virtual JQGrid.

    $("#jqxGrid_EpisodeList").jqxGrid(
    		    {
    		        columnsheight: 70,
    		        theme: 'jqwEDD',
    		        width: '100%',
    		        source: dataAdapter,
    		        pageable: true,
    		        pagesizeoptions: ['30'],
    		        pagesize: 30,
    		        virtualmode: true,
    		        rendergridrows: function(args) {
    		            return args.data;
    		        },
    		        autoheight: true,
    		        sorttogglestates: 1,
    		        filterable: true,
    		        showfilterrow: 'list',
    		        sortable: true,
    		        autoheight: true,
    		        autorowheight: true,
    		        selectionmode: 'custom',
    		        enablehover: false,
    		        altrows: true,
    		        columns: [
    			        { text: 'CHI', datafield: constant_columns.data_chi, filtertype: 'none', width: '70', cellsrenderer: chiLinkRenderer, cellsalign: 'left' },
    			        { text: 'Surname,<br/> Forename', datafield: 'patientName', filtertype: 'none', width: '100', cellsrenderer: defaultRenderer, cellsalign: 'left' },
    			        { text: 'Ward', datafield: 'DSITEM_Ward', filtertype: 'checkedlist', width: '80', cellsrenderer: defaultRenderer, cellsalign: 'left' },
    			        { text: 'Date Admitted', datafield: 'DSITEM_HospitalArrivalDT', width: '90', filtertype: 'none', cellsrenderer: dateRenderer, cellsalign: 'left' },
    			        { text: 'Date<br/> Discharged/<br/> Deceased', datafield: 'DeceasedOrDischargedDT', width: '100', filtertype: 'none', cellsrenderer: dateRenderer, cellsalign: 'left' },
    			        { text: 'Diagnosis at Discharge', datafield: 'DischargeDiagnosisText', width: '230', filtertype: 'none', cellsrenderer: defaultRenderer, cellsalign: 'left' },
    			        { text: 'Discharge Consultant', datafield: 'DischargeConsultantFullname', width: '180', filtertype: 'checkedlist', cellsrenderer: defaultRenderer, cellsalign: 'left' },
                        { text: 'Discharge Status', datafield: 'EpisodeActiveStateText', width: '270', filtertype: 'checkedlist', cellsrenderer: stateLinkRenderer, cellsalign: 'left' },
    		            { text: '', datafield: 'UIEnableView', filtertype: 'none', cellsrenderer: viewLinkRenderer, width: '30', cellsalign: 'left' },
    		            { text: '', datafield: 'UIEnableEdit', filtertype: 'none', cellsrenderer: editLinkRenderer, width: '30', cellsalign: 'left' },
    		            { text: '', datafield: 'UIEnableAmend', filtertype: 'none', cellsrenderer: amendLinkRenderer, width: '40', cellsalign: 'left' },
    		            { text: '', datafield: 'UIEnableFinal', filtertype: 'none', cellsrenderer: finalLinkRenderer, width: '30', cellsalign: 'left' },
    			        { text: 'Total Recs', datafield: 'total_recs', filtertype: 'none', hideable: 'true', hidden: 'true', width: '0', cellsalign: 'left' }
    			    ]
    		    });
    
    $(function() {
                $("a#imgPrintPageNEW").click(printClick);
            });
            
            function printClick(){
    var data = $("#jqxGrid_EpisodeList").jqxGrid('exportData','json');
    alert(data);
    }
    

    Using exportData on this when on page 1 works fine in IE8
    However once I’ve moved onto any other page the exportData fails with:

    Webpage error details

    
    User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; chromeframe/30.0.1599.101; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729; .NET CLR 1.1.4322; .NET4.0C; .NET4.0E; InfoPath.1)
    Timestamp: Wed, 27 Aug 2014 09:39:15 UTC
    
    Message: Object doesn't support this property or method
    Line: 7
    Char: 1189
    Code: 0
    URI: http://nwczc0225r4d.tnhs.tayside.scot.nhs.uk/TaysideDischarge.Web/JavaScript/jqwidgets/jqxdata.export.js
    

    Was using JQWidgets 3.2.2 now got the current 3.4.0 version and the same issue occurs
    The same code works fine in Opera 23 so not sure if this is an IE8 issue or something I’ve got wrong.

    Any ideas?

    Thanks
    Niall


    Peter Stoev
    Keymaster

    Hi Niall,

    1. The method’s name is “exportdata”, not “exportData”.
    2. In virtual mode, you can export only the data loaded in the Grid because data is loaded on demand and the Grid does not know what’s the data on your server.
    3. Please, share a full sample which we would be able to test(preferably use jsfiddle.net and post a link)

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com


    nialliwallace
    Participant

    Thanks Peter,

    1. Yes that’s a typo on my part
    2. I’m aware of this, it’s fine as I only need the data currently on the users screen.
    3. jsfiddle.net doesn’t seem to work in IE8 either. (I really can’t wait until we’re off XP here)
    I’ll try and create a full example and post it in a bit. (using an ws source which I can’t use in the example)


    Peter Stoev
    Keymaster

    Hi Niall,

    No problem, we will test it when you post the sample. Looking forward to it.

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.