cfgrid – variables and cfcs

The other day I was baffled with a questions of my own(not to say that it doesn’t happen to me often) but I was surprised of the solution I came up with. Alright, here we go.

Recently I was very heavily involved in cfgrids and working on some of the format changes. So what I wanted to do was pass my own variable(s) on top of the regular cfgrid(format) variables.

Question 1. How do I do that?
Then I realized some of these are NOT single values, there are more likely arrays (or String, if I may).

Question 2. How do I pass strings to cfc (because it only accepts arrays) and how to pass them thru cfgrid?

Sooooooo, after much research I found out that passing variables to a cfgrid is done as below.

<cfgrid name="gridname" ........ bind="cfc:myCFC.myFunction({cfgridpage},
{cfgridpagesize},
{cfgridsortcolumn},
{cfgridsortdirection},
'#myVar_PI_Names_Format#',
'#LoggedIn_Type#',
'#myVar_ADMIN_Names_Format#'
)"...

Advertisements
cfgrid – variables and cfcs

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s