Forum

November 2nd, 2014
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
2 clicks to reload ... ?
20/11/2008
07:56
Avatar
pierrem
Member
Members
Forum Posts: 6
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

Hi,

I have to click 2 times to get the grid refreshed after having clicked on button "Relancer la recherche avec les dates indiquées ci-dessous"...
The new 'url' is updated, as seen with the alert displayed on gridComplete but the 'old' datas remain on the grid ...
Any idea ?

(by the way, the new 'caption' and 'loadtexte' are not showing) ...

Thanks in advance, Tony

### code hereunder ####

jQuery("#list19").jqGrid(
{
    url:"xmlmap_serveur.php",
    datatype: "xml",
       colNames:["Intitulé","Ville","Date"],
       colModel:[
               {name:"intitule",    index:"Intitule",     width:220,     xmlmap:"intitule"},
            {name:"ville",        index:"Ville",         width:150,     xmlmap:"ville>intituleVille"},
            {name:"date1",        index:"date1",         width:90,     xmlmap:"dateValiditeDebut"}
           ],
    height:250,
        viewrecords: true,
    loadonce: false,
    loadtext: "charentes-info.com récupères les données que vous avez demandé ...",
    xmlReader:
    {
        root:'details',
        row:'detail',
        repeatitems:false
    },
    caption: "Liste des manifestations trouvées par charentes-info",
    sortname: "date",
    onSelectRow: function(id){$.showAkModal("xmlmap_produit.php?id="+id,"",870,500);},
    gridComplete: function(){alert(jQuery("#list19").getGridParam("url"));}
})

.navGrid('#pager',{edit:false,add:false,del:false, refresh:false, search:false})
    .navButtonAdd('#pager',
    {caption:"Relancer la recherche avec les dates indiquées ci-dessous",
        onClickButton:function()
        {requette();}     
    }
);

function requette()
{
    debut=document.formulaire.debut.value;
    fin=document.formulaire.fin.value;
    jQuery("#list19").setGridParam({caption:"new_caption_here"}).trigger("reloadGrid");
    jQuery("#list19").setGridParam({loadtext:"new_loadtext_here"}).trigger("reloadGrid");
    jQuery("#list19").setGridParam({url:"xmlmap_serveur.php?debut="+debut+"&fin="+fin}).trigger("reloadGrid");
    //alert(jQuery("#list19").getGridParam("url"));   
}

21/11/2008
03:38
Avatar
tony
Sofia, Bulgaria
Moderator
Members

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

Hello,

You call 3 time trigger reload grid - this of course IMHO is bad idea, since

there is unknown which trigger will finish first. To work this:

function requette()
{
    debut=document.formulaire.debut.value;
    fin=document.formulaire.fin.value;
    jQuery(”#list19?).setGridParam({caption:”new_caption_here”,

loadtext:”new_loadtext_here”,

url:”xmlmap_serveur.php?debut=”+debut+”&fin=”+fin

}).trigger(”reloadGrid”);

}

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.

21/11/2008
11:04
Avatar
pierrem
Member
Members
Forum Posts: 6
Member Since:
13/11/2008
sp_UserOfflineSmall Offline

Of course ...

Thank's a lot for your patience

:>)

Forum Timezone: Europe/Sofia

Most Users Ever Online: 715

Currently Online:
27 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