I'm trying to use an HTML table layout to "organize" several components, one of which is an cfgrid... but nothing shows up, the cfgrid doesn't populate. In fact, in the following example, only the first row of the HTML table is painted in the browser.

here's a sample:

<html>
<body>
<table>
<tr>
<td> some title </td>
</tr>
<tr>
<td>
<cfquery name="getEmp" datasource="MYDSN">
select * from emp
</cfquery>

<cfform format="flash" skin="haloSilver">

<cfgrid name="empGrid" query="getEmp" rowheaders="false">
<cfgridcolumn name="First" header="First Name" width="120">
<cfgridcolumn name="Last" header="Last Name" width="120">
</cfgrid>

</cfform>
</td>
</tr>
</table>
</body>
</html>

This situation applies to multiple queries, and works very well when you remove the <table> elements altogether... I haven't been able to find anything to support this method or not support it...

Any help would be greatly appreciated,

Thanks,

-X

ummm, ya... you have to make sure that <td> tags have appropriately sized pixel-based width and height values (height="300" etc)... %-based tags don't seem to work (perhaps, its CF's build-in IDS for SQL injection rejection filtering the ol' %-)

-X

hi
xf....
You can have this code now its working just change the datasource name in query tag....
its working fine at my side

<html>
<cfquery name="getEmp" datasource="#application.dsn#">
select * from emp
</cfquery>
<body>
<table>
<tr>
<td> some title </td>
</tr>
<tr>
<td>


<cfform format="flash" skin="haloSilver">
 
<cfoutput>
<cfgrid name="empGrid"  query="getEmp" rowheaders="false">
<cfgridrow data="firstname" >
<cfgridcolumn display="yes" name="firstname" header="First Name" width="120">
<cfgridcolumn name="lastname" header="Last Name" width="120">
</cfgrid>
</cfoutput>
</cfform>
</td>
</tr>
</table>
</body>
</html>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.