jQWidgets Forums

jQuery UI Widgets Forums Grid grid sorting

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 11 years, 4 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    grid sorting Posts
  • grid sorting #51295

    mario santanche
    Participant

    Hi,
    I use the 3.2.1 version. I have a problem with the grid sorting.
    This is my code:

          var source =
                {
                    datatype: "json",
                    datafields: [
                        { name: 'ID', type: 'number' },
                        { name: 'titolo', type: 'string' },
                        { name: 'IDEditore', type: 'string' },
                        { name: 'Editore', type: 'string' },
                        { name: 'PrintISSN', type: 'string' },
                        { name: 'OnLineISSN', type: 'string' },
                        { name: 'AltroISSN', type: 'string' },
             
                     ],
           
                    url: url,
              
                };
                var dataAdapter = new $.jqx.dataAdapter(source);
               $("#jqxgrid").jqxGrid(
                {
                    width: 1000,
                    selectionmode: 'singlecell',
                    enablebrowserselection: true,
                 	showfilterrow: true,
                    source: dataAdapter,
                    filterable: true,
                    pageable: true,
                    autoheight: true,
           		autorowheight: true,
                    theme: theme,
                    sortable: true,
                    localization: getLocalization(),
                    
                    columns: [
                     { text: '', datafield: 'Edit',width: 30, filterable:false,  columntype: 'number', cellclassname: classSel, menu:false, sortable: false,cellsrenderer: function () {
                         return '<img style="display: block;  margin:5px auto;" height="15" width="23" src="images/occhio.png"/>';
                     }  
                     },
                      { text: 'titolo', columntype: 'textbox', filtertype: 'textbox', datafield: 'titolo', width: 480 },
                      { text: 'editore', filtertype: 'textbox', datafield: 'Editore', width: 241, cellclassname: classSel },
                     { text: 'issn', filtertype: 'textbox', datafield: 'PrintISSN', width: 83},
                     { text: 'issn-l', filtertype: 'textbox', datafield: 'OnLineISSN', width: 83 },
                     { text: 'altro', filtertype: 'textbox', datafield: 'AltroISSN', width: 83 },
                    ]
                });
    

    When I click on ‘titolo’ column header and I sort from Z to A, I get this order: W X Y Z Ö. Why Ö after Z?
    Otherwise, Mysql sorts my data correctly.
    Best regards,
    Mario Santanché

    grid sorting #51297

    Peter Stoev
    Keymaster

    Hi Mario Santanché,

    I suppose that’s due to the fact that Ö is a special character out of the A-Z order. The good news are that you can easily customize the Grid’s Sorting in the way you wish: – http://www.jqwidgets.com/jquery-widgets-demo/demos/jqxgrid/customsorting.htm?arctic

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

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

You must be logged in to reply to this topic.