RSS Forums RSS
Please support our ColdFusion advertiser: Programming Forums
Views: 2250 | Replies: 2
Reply
Join Date: Jul 2007
Posts: 2
Reputation: xfreyje is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xfreyje xfreyje is offline Offline
Newbie Poster

cfgrid inside an HTML table... possible?

  #1  
Jul 20th, 2007
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
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Jul 2007
Posts: 2
Reputation: xfreyje is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
xfreyje xfreyje is offline Offline
Newbie Poster

Re: cfgrid inside an HTML table... possible?

  #2  
Jul 20th, 2007
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
Reply With Quote  
Join Date: Jul 2007
Posts: 2
Reputation: ibmwaseem is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
ibmwaseem ibmwaseem is offline Offline
Newbie Poster

Re: cfgrid inside an HTML table... possible?

  #3  
Jul 31st, 2007
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>
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 7:08 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC