jQWidgets Forums

Forum Replies Created

Viewing 7 posts - 1 through 7 (of 7 total)
  • Author
    Posts
  • in reply to: jqxdata.export.js jqxdata.export.js #81846

    dfleming
    Participant

    As an aside, I’m very pleased with how well you implemented all the changes from v2.8.3 to v4.0.0. Other than working around this error, I’ve only had to make one small change to the our cellsrenderer function in jqxGrid. I wish other code that we update would be as trouble free.

    I’ve been through the release history looking for where the problem was introduced. The only reference to jqxdata.export.js is in v3.9.1. This problem was actually introduced into the code in v3.8.1.

    This error occurs because the saveAs function in jqxdata.export.js is being defined as a global function. In v4, line 4510 of jqxdata.export.js, jQuery is used like this: $(““)[0]. Because of the way we are using require.js, the $ function isn’t defined at that point, causing the error.

    That was a change in v3.8.1. If you look at line 4511 in v4.0.0 jqxdata.export.js, you’ll see the way it was done in v3.8.0. If I comment line 4510 and uncomment line 4511, the code loads without errors. I can also just change line 4510 to jQuery(““)[0] to eliminate the error.

    This is probably caused by the particular way in which we are using require.js to load the files.

    in reply to: Grid custom sort function Grid custom sort function #50712

    dfleming
    Participant

    Hi Peter,

    I’m not saying the code needs to be changed, although it would be nice if jqxGrid would call the custom sort function with a consistent value for direction.

    Instead, these are the values that it is called with, without my code ever calling ‘sortby’:

    true, false, null, ‘asc’, ‘desc’, ‘ascending’, ‘descending’, {ascending: true, descending: false}, {ascending: false, descending: true}

    If the documentation had said that, or your example custom function had handled those options, I would have no problem.

    The documentation instead just says ‘asc’ or ‘desc’ can be used for the sort direction.

    I’m just asking that the documentation explains that those values are used for direction.

    in reply to: Grid custom sort function Grid custom sort function #50702

    dfleming
    Participant

    Here’s a sample of the problem, using v3.2.1 and the sample custom sort function in your documentation online.

    http://jsfiddle.net/donrfleming/U4mbJ/8/

    The grid when first loaded should be sorted in descending order, as the source object is set up with these three members, per your documentation:

    sort: customsortfunc,
    sortdirection: ‘desc’,
    sortcolumn: ‘productname’

    When the grid loads, the custom sort function is called with direction==’desc’ by invoking getstate,loadstate. That’s not recognized in your sample sort function, but is not null, so the function sorts in ascending order.

    The same problem exists with jqxGrid(‘sortby’, ‘firstname’, ‘desc’) because desc is not handled so the grid is sorted in ascending order.

    Click on a column header and it will sort properly, because direction set to true,false, or null is handled correctly.

    Sort using the sort drop menu to see direction set to “ascending”, “descending”, or null.

    in reply to: Grid custom sort function Grid custom sort function #50689

    dfleming
    Participant

    Has this issue been fixed? Although I’d like to use the latest version, when I tried to use it a few weeks ago many other problems appeared with the grid. So we’re stuck with using v2.8.3 until I have time to work through the other problems.


    dfleming
    Participant

    try this: $(jqxgrid).jqxGrid(‘exportdata’,’csv’,’Application’, true, null, true, ‘/jqw/safe-file.php’);

    Don’t forget the null, “true,null,true” not “true,,true”


    dfleming
    Participant

    This works for me. Set one of the column widths to ‘auto’

    var columns = [
    {text: “Description”, datafield: “description”, width: ‘auto’},

    ];

    $(“mygrid”).jqxGrid({
    width: “100%”,
    height: “100%”,
    columns: columns,

    }


    dfleming
    Participant

    Forgot the version:

    jQWidgets v2.8.1

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