Joel asks:
I have problems with using CFGRID and hope you can help. Here are my issues:
- When sorting the 2nd and 3rd columns sort ok, the first causes an error stating an "Error in executing the Query".
This is actually not a CFGRID issue, but an issue with your data provider, which is most likely a CFC. You need to debug why your CFC is throwing an error. This can be done multiple ways. The easiest is to use Firebug - not the request throwing the error, and open the request in a new tab. You will see more information about the error.
2. And is there a way to prevent the columns from being moved?
Well, I'm not sure why you would want to block that, but if you get access to underlying grid object (using ColdFusion.Grid.getGridObject(), you should be able to use the Grid api to disable this behavior. You may have to look up the Grid docs at Ext first though. (And yes, I'm being lazy, but I figure telling you where to look is a bit helpful. :)
Now let me assume my Stan "I think I've learned something" pose: This blog entry speaks to two topics I've covered a few times before, and I really think it touches on folks who are just now getting into Ajax stuff because of ColdFusion. It is critical you get that:
a) Learn to debug. Tools like Firebug are critical for figuring out what went wrong with an Ajax-based request. You must - I repeat, must get familiar with this as it will make your life much easier to handle.
b) Remember that the Ajax tools that ColdFusion 8 uses are all based on third party tools. You can (and should) go to those sites - read the docs - and get familiar with them if you want to go "beyond the basics" in terms of how you use them within ColdFusion.
Archived Comments
Is there anyway to bind to a CFC so that you can allow sorting but ALSO utilize the groupfield attribute? I get an error but it seems like there must be a way.
As far as I know - no.
Wow, am I crazy to think that seems like such a simple thing? Is there any way to trick a grid to display it like the groupfield does?
If I understand right, groupfield applies to a cfquery. When you bind, you still work with queries, but they are pretty different (loaded over the wire, with paging info). In fact, the paging would make grouping kinda difficult.
Just as an FYI, after hours of searching, this seems to be what I need! http://brianflove.com/publi... - http://blog.brianflove.com/...
Was this solved (1st question) - I am having the same problem.
Not that I know of.