tracker issue : CF-3712885

select a category, or use search below
(searches all categories and all time range)
Title:

cfgridcolumn : name parameter is not honored with JS binding in grids.

| View in Tracker

Status/Resolution/Reason: Closed/Fixed/

Reporter/Name(from Bugbase): / ext-user (Piyush Kumar Nayak)

Created: 02/25/2014

Components: AJAX, UI Components

Versions: 11.0

Failure Type:

Found In Build/Fixed In Build: 288701 /

Priority/Frequency: Major / Some users will encounter

Locale/System: English / Windows 7 SP1 64-bit

Vote Count: 0

Listed in the version 11.0.03.292480 Issues Fixed doc
Problem: cfgridcolumn : name parameter is not honored with JS binding in grids.

Method:
<!------------------------ test.cfm ----------------------------->
<cfajaxproxy cfc="places" jsclassname="dashboardUser" >
<html>
	<head>
		<script language="javascript">
		GetData = function(page,pagesize,sort,sortdir)  
		{
			var gridProxy = new dashboardUser();
			gridProxy.setHTTPMethod("GET");
			result = gridProxy.getData(page,pagesize,sort,sortdir);
			return result;
		}
		</script>
	</head>
<body>
	<cfset variables.gridargs = {
		width="400",
		bindOnLoad="yes",
		bind="javascript:GetData({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"}>
	<cfform name="form01" id="form01">
		<cfgrid  format="html" name="grid01" attributeCollection="#variables.gridargs#" > 
			<cfgridcolumn name="Email" display="true" header="Email">
			<cfgridcolumn name="LastName" display="true" header="Last Name">
			<cfgridcolumn name="Emp_ID" display="true" header="Emp ID"  >
			<cfgridcolumn name="FirstName" display="true" header="First Name">		
		</cfgrid>		
	</cfform>				
</body>
</html>
<!------------------------ places.cfc ----------------------------->
<cfcomponent>
    <cffunction name="getData" access="remote" output="false">    
        <cfargument name="page">
        <cfargument name="pageSize">
    	<cfargument name="gridsortcolumn">
    	<cfargument name="gridstartdirection">
        <cfset startRow = (page-1)*pageSize>
        <cfset endRow = page*pageSize>
        
        <cfquery name="team" datasource="ajax">
             SELECT Emp_ID, FirstName, LastName, EMail
             FROM Employees
        </cfquery>
    	
        <cfreturn QueryConvertForGrid(team, page, pageSize)>
    </cffunction>
</cfcomponent>

Result:
observe that the data in the columns are mismatched. For eg. Column 'Email' shows empIDs.

Expected:
The columns should be binded to the names of the query columns specified in the cfgridcolumn:name parameter.

Workaround:n/a

----------------------------- Additional Watson Details -----------------------------

Watson Bug ID:	3712885

External Customer Info:
External Company:  
External Customer Name:  
External Customer Email:

Attachments:

Comments:

We need support from ExtJS on Javascript binding. Since it is under pricing negotation, it would take some time and cant be done for the final release. Putting it to update.
Comment by Rupesh K.
13235 | March 12, 2014 01:37:38 AM GMT
I've verified this is fixed in CF11 Update 3. Query columns are correctly mapped to their associated grid column when using bind="javascript:.." Thanks!, -Aaron
Comment by External U.
13236 | November 06, 2014 05:58:38 AM GMT