Copy link to clipboard
Copied
We are running Coldfusion 2016, this issue was not present in Coldfusion 9 which we upgraded from.
I am using a basic CFGRID on my page that is getting loaded from a query. I am using the tag based method to code my page.
One item in the query is an HREF link that brings the user to another page with info specific to that row. The dataset being passed to the cfgrid can be large.
My issue is when the CFGrid become longer than the page. The grid displays fine but when I scroll lower than the first row when the row, or link, is clicked the page just jumps to the top of the CFGRID. The selected row is highlighted, but the link isn't activated.
There is nothing special to my cfgrid tag or my gridcolumn tags. My page is not calling any custom javascript files or anything. i just have the grid and some text above it
<cfgrid name="grdSearchResults" format="html" query="qrySearchResults" >
<cfgridcolumn name="ID" header="Banner ID" width="100">
<cfgridcolumn name="EMPLOYEE_ID" header="Employee ID" width="100">
<cfgridcolumn name="NAME" header="Name" width="200">
<cfgridcolumn name="TERM" header="Term" width="100">
<cfgridcolumn name="PROGRAM" header="Program Block" width="100">
<cfgridcolumn name="CURRENT_STATUS" header="Current" width="200">
<cfgridcolumn name="VIEW_PHOTO_LINK" header="View Photo" width="100">
</cfgrid>
I have tried adding the selectOnLoad = false option with no luck.
Has anyone else experienced this, and if you resolved this issue, how?
Copy link to clipboard
Copied
Is it doing this in any browser other than IE11?
V/r,
^ _ ^
Copy link to clipboard
Copied
Sorry should have mentioned this in the initial post. This issue is only happening in IE. It works in Chrome and Firefox. I've been informed that I can't force our users to switch browsers unfortunately
I've been using IE11's dev tools to simulate other versions of IE and it happens in older versions of IE as well.
Copy link to clipboard
Copied
That was going to be my next question - check the Compatibility Settings. But if it's doing that in older versions, as well..
V/r,
^ _ ^
Copy link to clipboard
Copied
It's unclear where your link is activated. Suppose you want the link to take the user to the page viewPhoto.cfm. Suppose also that this page is in the same directory as the CFM page containing the grid.
Then, if you wished to pass the employee_id of a specific row when the user clicks, you could use something like
<cfgridcolumn name="VIEW_PHOTO_LINK" href="viewPhoto.cfm" hrefkey="employee_id" header="View Photo" width="100">
Let's say that employee_id is 937 and current_status is Running for a specific row. If that row's link is clicked, ColdFusion will take the user to http://.../viewPhoto.cfm?CFGRIDKEY=937
If, instead, you wished to pass the current_status of a specific row, you would then use
<cfgridcolumn name="VIEW_PHOTO_LINK" href="viewPhoto.cfm" hrefkey="current_status" header="View Photo" width="100">
This time, when the link is clicked, ColdFusion takes the user to http://.../viewPhoto.cfm?CFGRIDKEY=Running
That said, you should consider using an alternative for cfgrid. For example, jQuery's datatable. That is because ColdFusion's User-Interface tags such as cfform, cfgrid, cflayout, etc. are outdated.