jQWidgets Forums

Forum Replies Created

Viewing 15 posts - 1 through 15 (of 15 total)
  • Author
    Posts

  • Gwyn
    Participant

    If anyone else stumbles across this problem, the workaround is to programmatically scroll top left before doing the export e.g;

    $(‘#jqxgrid’).jqxGrid(‘scrolloffset’, 0, 0);


    Gwyn
    Participant

    Have tested and it actually requires 2 changes to make a CSV file that will properly handle multi-line cells and save in a format that Excel can open (which is what most people use in the business world)

    this.beginRow = function () {
        if ((rowIndex > 0) || (rowIndex == 0 && hasHeader)) {
            //**************************************************
            //file += '\n';
            file += '\r\n';
            //**************************************************
        }
        rowIndex++;
    };
    function prepareData(data, dataOptions) {
        if (dataOptions) {
            var format = me.getFormat(dataOptions);
            data = me.formatData(data, format.type, format.formatString, format.localization);
        }
        //**************************************************
        // data = ‘”‘ + data + ‘”‘;
        data = ‘”‘ + data.replace(/”/g,'””‘).replace(/\r\n/g,’\n’) + ‘”‘;
        //**************************************************
        return data;
    };

    Gwyn
    Participant

    Please use this hacked together fiddle that demonstrates the problem
    Ensure that you have the grid scrolled right so that one or more left columns are not visible
    Press export
    You’ll notice in the xls file that the left hand columns have a style of white on white!

    http://jsfiddle.net/gwynge/vketsc14/17/


    Gwyn
    Participant

    As far as I can see it’s a one line fix in jqxdata.export.js

    function prepareData(data, dataOptions) {
    if (dataOptions) {
    var format = me.getFormat(dataOptions);
    data = me.formatData(data, format.type, format.formatString, format.localization);
    }
    //**************************************************
    // data = ‘”‘ + data + ‘”‘;
    data = ‘”‘ + data.replace(/”/g,'””‘).replace(/\r\n/g,’\r’) + ‘”‘;
    //**************************************************
    return data;
    };

    Why after 3+ years of the problem being known that simple fix still hasn’t been made – who knows. But I really don’t want to manage a codeset of simple fixes that you couldn’t be arsed to make – so please – fix it. Soon.


    Gwyn
    Participant

    I’ve just discovered this. Also, if there are \r\n in any of the cells it also fails to treat that properly.

    This is a bug –> It’s producing an invalid CSV format.

    When will it be fixed?

    in reply to: how to export data into pdf how to export data into pdf #103191

    Gwyn
    Participant

    I spy tumbleweed!

    in reply to: how to export data into pdf how to export data into pdf #103107

    Gwyn
    Participant

    anything further on this?


    Gwyn
    Participant

    I’ve just realised that the only reason that your fiddle works is because you commented the group aggregates out of the original configuration

    So, no, it doesn’t work I’m afraid.

    in reply to: how to export data into pdf how to export data into pdf #102923

    Gwyn
    Participant

    Try this fiddle:

    http://jsfiddle.net/gwynge/qs5mr/1080/

    you’ll need to look at the console.
    Excel export runs quickly and produces a text string as expected

    Pdf export is incredibly slow and produces and object. What are you supposed to do with that?


    Gwyn
    Participant

    That works, many thanks!

    in reply to: how to export data into pdf how to export data into pdf #102887

    Gwyn
    Participant

    The documentation doesn’t specify it but you can’t export PDF and get the data out – it returns an object, not a string representing the object.

    I presume that the conversion of the object to a PDF is carried out on the server and so this only actually works if you use the jqwidgets server.

    PDF export is essentially broken and the documentation needs to be updated accordingly

    in reply to: Cannot set height:100% on grid Cannot set height:100% on grid #102811

    Gwyn
    Participant

    I’ve now set the parent div to be height 100% in my usage and it’s solved the problem (although I have new issues which I now need to get to the bottom of!).

    I really like the grid, I just hope that I can get it to work in my application environment


    Gwyn
    Participant

    Hi Peter,

    I agree and that’s what I’ve done but the processing is that slow there must be something very unfortunate going on under the scenes so it should probably be fixed/changed. As I said there is no point in what it currently does because if you try and treat dates as US then UK you will end up with inconsistent results and so it is (1) trying to be smarter than is useful and (2) is really slow!!

    It was only by luck that I wondered of perhaps it was date formatting and tried changing the format otherwise I could have spent a loooooong time trying to get to the bottom of this…

    in reply to: Column menu shows behind grid Column menu shows behind grid #102809

    Gwyn
    Participant

    Thanks, I figured this is probably the solution. There isn’t really a standard for z-index so mixing and matching components means pain!

    in reply to: Cannot set height:100% on grid Cannot set height:100% on grid #102785

    Gwyn
    Participant

    The trouble with this is that by adding that style it is going to affect everything else in the page, possibly negatively.

    I anticipate that the widget is a self-contained element that can be slotted into a web page without impacting anything outside of it. In other words within a hosting Div I expect everything to do with the widget sits within that.

    That doesn’t seem to be the case.. (and may demonstrate my naivety with HTML/CSS)

    So I suppose the other question is *how* to make it so that it simply takes the height of its parent div (which will have a size) *without* impacting anything else on the page

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