Uncategorized
Filter Your CFGRID Revisited
Yesterday I posted some code for using the new Flash Forms in CF7 to have a filter on your cfgrid component. Nahuel Foronda took what I started and made right with the ActionScript.
Its funny, I didnt see to much wrong with what I had done until I looked at his and saw how much cleaner it was. Its amazing what someone poor in AS knowledge will let the public see
And nice to see it done better too!
Thanks Nahuel for the straightening out the mess I posted yesterday, and fixing the 2 bugs I new to be present. Below is the actionscript that he updated to make it run better.
if(_global.arrMembers == undefined) _global.arrMembers = data.dataProvider.slice(0);
var arrMembers = _global.arrMembers;
var arrDisplay:Array = [];
for(var i = 0; i < arrMembers.length; i++)
{
if(arrMembers[i].dept == myselect1.value || myselect1.value == ‘All’)
{
arrDisplay.push(arrMembers[i]);
}
}
data.dataProvider = arrDisplay;
</cfsavecontent>
Check out my post yesterday, or on Nahuel’s site for the full code listing.
09 Mar 2005 Simeon
