Add Comment
Adding an image into CFGrid
ColdFusion Tutorial #34
This demo demonstrates how to add an image to a cell in CFGrid
demo.cfm
This is main file and display the CF8 HTML format grid.in this demo i created an extra column "Action" in the query . and for all rows of this column i set the value 1 . and later on changing this column data using init().
init() is responsible For adding an image into HTML Grid. Which in turn call the myf().
12: Get the Grid object
14: Get the Column Array
Following line is the main culprit for changing the column data .It call the myf() for changing the data of the column.
16: render the image in column "Action"
18: Now reConfigure the Grid
data.cfc
The cfc is just a normal CFC, only requirement is that the methods you wish to call have an access type of "remote".Also if you are returning query data for Coldfusion8 HTML GRID then you have to use the QueryConvertForGrid().
Demo
See this code running!
Download
Download this code as a zip!
Comments
good one , prashant !!ANOOJ @ Tuesday 12 May 2009 - 04:11:54 PM
Good 1, very informative :)
Harish Nair @ Tuesday 12 May 2009 - 04:15:47 PM
Can I use in ColdFusion 7.0.2 ??
I tried, not working .. Pl help whne you get a chance. I think there is no Bind option available.
Thanks,
oh44070
oh44070 @ Wednesday 05 May 2010 - 05:41:09 AM
Click button to add a comment
Author
Prashant Gupta