ColdFusion cfgridupdate
From my previous post - working with cfgrid can be fun, and easy… except for when I try to do things without reading the documentation first. One such example was taking what I did before with the onChange calling the ActionScript getURL method and posting variables to a page. Getting these pages in the URL was easy, but getting them by FORM was much harder. After seeing how the form processes the information (a big, long, ugly string of characters with random form info embedded), I started to write a quick and dirty parser to get rid of all that crap I didn’t need. As I’m writing this, I happen to glance at the LiveDocs for cfgrid, and I see the cfgridupdate tag. I am literally on the last line of the parser I was writing. I copied the example for cfgridupdate, fit it around my existing code, and… it failed. Quick database tip: when wanting to use cfgridupdate, be sure that you have a primary key defined and you have keyOnly=”yes” specified in the cfgridupdate tag, otherwise bad things can and will happen. After changing this around, it worked like a charm!
Learn from my mistakes and ALWAYS read the LiveDocs or the CFWACK before attempting this at home.
Did you enjoy this post? Why not leave a comment below and continue the conversation, or subscribe to my feed and get articles like this delivered automatically to your feed reader.

Comments
No comments yet.
Leave a comment