Forum

July 12th, 2025
A A A
Avatar

Lost password?
Advanced Search

— Forum Scope —




— Match —





— Forum Options —





Minimum search word length is 3 characters - maximum search word length is 84 characters

The forums are currently locked and only available for read only access
sp_Feed Topic RSS sp_TopicIcon
Scroll and sort problem
02/07/2009
15:17
Avatar
glemarie
France
Member
Members
Forum Posts: 66
Member Since:
19/12/2008
sp_UserOfflineSmall Offline

Hi,

I'm currently trying to use the “scroll” and autoload functionality. It works well, but when I sort a column, it does not sort the already loaded data in the grid.

Instead, it loads the page #1 with the asked sort order and add these data at the end of the already loaded data.

I can see in the examples that it's not suppose to be like that, but I can't see why I have this result. Any help would be appreciated :-)

I user latest jqGrid3.5 beta (build 10).

jQuery(”#listEvenements”).jqGrid({

    datatype: “json”,
    url:'getValues.php?type=contentEvenement',
    colNames:['Type', 'Date', 'Statut', 'Contact', 'IdSociete', 'Société', 'Fichier', 'Outlook', 'Commercial'],
    colModel:[
        {name:'Type',index:'Type', hidden: false, sortable:true, search: true, edittype:'select', editoptions:{value:":Tous;1:Appel téléphonique;6:Présentation candidat;4:Présentation consultant;3:Proposition commerciale;2:Rdv de prospection;7:Suivi de mission"}},
        {name:'Date',index:'Date', align:"center", hidden: false, width:90, sortable:true, search: false},
        {name:'Statut',index:'Statut', hidden: false, width:80, sortable:true, search: true, edittype:'select', editoptions:{value:":Tous;4:Planifié;3:Annulé;2:Réalisé;1:Reporté"}},
        {name:'Contact',index:'Contact', align:"left", hidden: false, sortable:true, search: false},
        {name:'IdSociete',index:'IdSociete', align:"left", hidden: true, sortable:true, search: false},
        {name:'NomSociete',index:'NomSociete', hidden: false, sortable:true, search: true, edittype:'select', editoptions:{value:":Toutes;60:3M;122:CCPSSP;13:CHSSNSPSST"}},   
        {name:'Fichier',index:'Fichier', align:"center", hidden: false, width:50, sortable:false, search: false},
        {name:'Outlook',index:'Outlook', align:"center", hidden: false, width:50, sortable:false, search: false},
        {name:'Commercial',index:'Commercial', hidden: true, sortable:true, search: true, edittype:'select', editoptions:{value:":Tous;1:AAA"}}
        ],
    loadui:'block',
    loadtext:”Chargement…”,
    pager: jQuery('#pagerEvenements'),
    hidegrid: true,
    hiddengrid: false,
    pgbuttons:false,
    pginput:false,
    viewrecords:false,
    scroll: true,
    rowNum:10,
    imgpath: 'js/themes/emerit/images',
    sortname: 'Date',
    sortorder: “desc”,
    caption: “Evènements”,
    forceFit: true,
    loadonce: false,
    width: 1000,
    height: 120,
    toolbar:[true, "top"],
    ondblClickRow: function (rowid) {
        document.location='editRdv.php?IdRDV='+rowid;
    }
});

08/07/2009
05:29
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

This is the default behaviour - the reason for this is simple - if you load a lot of data and then sort it (suppose what you want) then the new loaded data should be inserted into the grid in appropriate order. This is not impossible, but requiere a lot of work. Currently not planed feature.

Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

08/07/2009
08:46
Avatar
glemarie
France
Member
Members
Forum Posts: 66
Member Since:
19/12/2008
sp_UserOfflineSmall Offline

Hi Tony,

I suppose my explanation was not so clear... And by the way I made some more tests.

I use the Autoload. When I sort a column, the ajax request is : page 1, x rows, and the new specified sort order.

But in fact, the already loaded data is not cleared form the grid and the new result is added. For exemple, I have a total of 6 records (a, b, c, d, e, f) and my grid shows 3 rows (a, b, c). Then I click on my column to sort in reverse order. I then have a, b, c (the previous rows), f, e, d (the first page of my new request) in ly grid.

But I also found while testing that sometimes, it works (the grid is correctly emptied). It seems to vary depending on the data (column value empty or not ?). I made a test with 3 basic columns (text content, sometimes empty) and I can't find any rule... But with these 3 columns (more simple data than the code in my first post) it works nearly all the time.

I hope my exmplanation are not too "ugly"...

Thanks for tour time

08/07/2009
11:15
Avatar
tony
Sofia, Bulgaria
Moderator
Members

Moderators
Forum Posts: 7721
Member Since:
30/10/2007
sp_UserOfflineSmall Offline

Hello,

I have make some changes when scroll true and we sort the grid. Could you plese download the last update from GitHub and try. Please let me know if this work as expected.

Thanks

Best Regards

Tony

For professional UI suites for Java Script and PHP visit us at our commercial products site - guriddo.net - by the very same guys that created jqGrid.

08/07/2009
15:20
Avatar
glemarie
France
Member
Members
Forum Posts: 66
Member Since:
19/12/2008
sp_UserOfflineSmall Offline

Hi Tony,

Thanks a lot, it seems OK ! Great work.

Regards.

Forum Timezone: Europe/Sofia

Most Users Ever Online: 994

Currently Online:
14 Guest(s)

Currently Browsing this Page:
1 Guest(s)

Top Posters:

OlegK: 1255

markw65: 179

kobruleht: 144

phicarre: 132

YamilBracho: 124

Renso: 118

Member Stats:

Guest Posters: 447

Members: 11373

Moderators: 2

Admins: 1

Forum Stats:

Groups: 1

Forums: 8

Topics: 10592

Posts: 31289

Newest Members:

, razia, Prankie, psky, praveen neelam, greg.valainis@pa-tech.com

Moderators: tony: 7721, Rumen[Trirand]: 81

Administrators: admin: 66

Comments are closed.
Privacy Policy   Terms and Conditions   Contact Information