ColdFusion 8 and turning of column header moving
Tags: Coldfusion, Ajax, Ajax UI
I wanted to blog this as I have done it before, and quickly forgot how I did this. So for others who might google a solution, then at least there will be something to find.
So as the post suggests I need to find a way to turn off the ability to move columns in the cfgrid running in ColdFusion 8, and it wasn't as hard as one might think.
The first thing one has to do is get the handle to the grid object, this can be achieved easy enough by doing the following.
myGrid = ColdFusion.Grid.getGridObject('GridName');
}
Once we have the handler, we can now add the following code.
myGrid.render();
By setting the enableColumnMove to false we are saying that we don't want to be able to move the columns, since we have made a change to the grid object we need to render this again. This is because we have made a change to the grid after it has already been rendered.
If you are not familiar with how to use this then here is the final code.
dataGridRender = function() {
myGrid = ColdFusion.Grid.getGridObject('GridName');
myGrid.enableColumnMove = false;
myGrid.render();
}
</cfsavecontent>
<cfajaxHtmlHead text="#jsHeadercode#" />
<cfajaxOnLoad("dataGridRender") />
Hopefully this helps a lot of people.
There are no comments for this entry.



TweetBacks