Copy link to clipboard
Copied
Hi all
How can I alternate the color of rows in html cfgrid?
I don't have acess to CFIDE/scripts/ajax/resources/ext/css/ext-all.css which is where according to firebug the css styles are kept
Thanks
goodychurro1 wrote:
How can I alternate the color of rows in html cfgrid?
Hi goodychurro1,
The cfgrid attribute you are looking for is "striperows". Optionally, you can also use the attribute "striperowcolor". Regarding your question in the other thread about binding href/select to a grid, you can use the following cfscript block to create the 'q' query in the example I posted in that other thread (if you're not on CF10).
<cfscript>
q = queryNew("myID,myString", "integer,varchar");
queryAddRow(
...Copy link to clipboard
Copied
goodychurro1 wrote:
How can I alternate the color of rows in html cfgrid?
Hi goodychurro1,
The cfgrid attribute you are looking for is "striperows". Optionally, you can also use the attribute "striperowcolor". Regarding your question in the other thread about binding href/select to a grid, you can use the following cfscript block to create the 'q' query in the example I posted in that other thread (if you're not on CF10).
<cfscript>
q = queryNew("myID,myString", "integer,varchar");
queryAddRow(q, 3);
querySetCell(q, "myID", 1, 1);
querySetCell(q, "myID", 2, 2);
querySetCell(q, "myID", 3, 3);
querySetCell(q, "myString", "one", 1);
querySetCell(q, "myString", "two", 2);
querySetCell(q, "myString", "three", 3);
</cfscript>
<cfform>
<cfgrid name="myGrid" format="html" width="200" query="q" striperows="yes" striperowcolor="##f9f886">
<cfgridcolumn name="myID" />
<cfgridcolumn name="myString" />
</cfgrid>
</cfform>
Reference:
- cfgrid
Thanks,
-Aaron
Copy link to clipboard
Copied
Thanks!
Copy link to clipboard
Copied
goodychurro1 wrote:
Thanks!
You're welcome!