Forum


Tony,
I'm trying to pass the value [name] of the current sort column in a url stream of the pager. See bold text below.
I'm using Cold Fusion. My url parameters on the input to ExportTo.cfm page show that sidx = sortCol.
how can I pass the value of sortCol ?
thanks, Jim
$("#agelist").navGrid("#agepager2",{edit:false,add:false,del:false,search:false,refresh:false,position:"right"}).navButtonAdd('#agepager2',{caption:"To PDF", buttonimg:"images/pdf.png", onClickButton:
function()
{
var sortCol = $("#agelist").getGridParam("sortname");
document.location.href='ExportTo.cfm?typ=p&met=DumpAGE&myacct=<cfoutput>#session.bizorg_objid#</cfoutput>&listtyp=age&sidx=+sortCol';
},
position:"last", title:'Export to PDF' }).navButtonAdd('#agepager2',{caption:"To Excel", buttonimg:"images/icon-xls.png", onClickButton: function(){document.location.href='ExportTo.cfm?typ=e&met=DumpAGE&myacct=<cfoutput>#session.bizorg_objid#</cfoutput>&listtyp=age';}, position:"last", title:'Export to Excel' })
;
Tony,
Part of my bold code was cut off.
$("#agelist").navGrid("#agepager2",{edit:false,add:false,del:false,search:false,refresh:false,position:"right"}).navButtonAdd('#agepager2',{caption:"To PDF", buttonimg:"images/pdf.png", onClickButton:
function()
{
var sortCol = $("#agelist").getGridParam("sortname");
document.location.href='ExportTo.cfm?typ=p&met=DumpAGE&myacct=<cfoutput>#session.bizorg_objid#</cfoutput>
&listtyp=age&sidx=+sortCol';
},
position:"last", title:'Export to PDF' }).navButtonAdd('#agepager2',{caption:"To Excel", buttonimg:"images/icon-xls.png", onClickButton: function(){document.location.href='ExportTo.cfm?typ=e&met=DumpAGE&myacct=<cfoutput>#session.bizorg_objid#</cfoutput>&listtyp=age';}, position:"last", title:'Export to Excel' })
;
15:35

Moderators
30/10/2007

Hello,
Sorry but I do not understand what you mean.
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.
Tony,
In my pager for my grid, I have links to dump the grid to pdf or excel. To do this I link to a coldfusion page (Export.cfm and passing the parameters I need to recreate the grid query) I want to pass the grids current sort parameters (name and order). I'm trying to use the .getGridParam method.
Is there another way to do this?
thanks, Jim
09:06

Moderators
30/10/2007

Hello,
After this line
var sortCol = $(”#agelist”).getGridParam(”sortname”);
if you have make alert(sortCol) what is the result.
Maybe you should check you code sidx=+sortCol - what is sidx - from where you have this value? What you expect from this expression. IMHO it will not work
Try first to construct you string and after that make the link.
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.
Tony,
Thanks for the pointer.
The value of sortCol in the alert() is the name of the current column selected as the sort. Which is what I expect it to be.
When I test the value of the URL that I pass, the value of sidx (just a url var) is: sortCol - not the value of sortCol.
How can I get the value of sortCol into this:
document.location.href='ExportTo.cfm?typ=p&met=DumpAGE&sidx=+sortCol';
Most Users Ever Online: 715
Currently Online:
90 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.comModerators: tony: 7721, Rumen[Trirand]: 81
Administrators: admin: 66