Answered
Dynamic cfgridcolumn name?
Hi There,
I'm having a query which returns different columns based on the input. I'm trying to get the cfgridcolumn name dynamic. For example, in below code column name ABC has been hardcoded.
<cfgrid bindonload="yes" bind="cfc:xyz.entityList({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="ABC" header="ABC"/>
</cfgrid>
Is there a way were we can mention the columnname as a variable? Something similor to:
<cfgrid bindonload="yes" bind="cfc:xyz.entityList({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfloop list="#entityList.ColumnList#" index = "index">
<cfgridcolumn name="ABC" header="ABC"/>
</cfloop>
</cfgrid>
Any help would be greatly appeciated.
Many thanks
I'm having a query which returns different columns based on the input. I'm trying to get the cfgridcolumn name dynamic. For example, in below code column name ABC has been hardcoded.
<cfgrid bindonload="yes" bind="cfc:xyz.entityList({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfgridcolumn name="ABC" header="ABC"/>
</cfgrid>
Is there a way were we can mention the columnname as a variable? Something similor to:
<cfgrid bindonload="yes" bind="cfc:xyz.entityList({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})">
<cfloop list="#entityList.ColumnList#" index = "index">
<cfgridcolumn name="ABC" header="ABC"/>
</cfloop>
</cfgrid>
Any help would be greatly appeciated.
Many thanks
