I want开发者_JS百科 to expand one row of my cfgrid on a button click and want to see some infomation about particular row .
You can with JS EXT. If you are using CF9 there are new attributes available that would allow you to add a new row using a insert button, but I am guess this is not what you are after.
It sounds like you want to have an option which expands a row of data then shows related data? Like this: http://dev.sencha.com/playpen/ext-2.0/examples/grid/grid3.html
You will need to use ext for this. you "could" hack CF, but to be honest implementing js ext cfgird would give you better flexibly. CF can still be used to bind.
The only other way I can think of with CFGRID would include HTML in row which have a onclick event and using js display text in the div. an example.....
<cfquery name="entries" datasource="cfartgallery" maxrows="5">
select *
from art
</cfquery>
<cfset queryAddColumn(entries, "add", arrayNew(1))>
<cfloop query="entries">
<cfset querySetCell(entries, "add", "<div='texthere'></div><input value='Click Me' type='button' onclick='javascript:testit(#artid#)'>", currentrow)>
</cfloop>
精彩评论