cfgrid inside an HTML table... possible?

Reply

Join Date: Jul 2007
Posts: 2
Reputation: xfreyje is an unknown quantity at this point 
Solved Threads: 0
xfreyje xfreyje is offline Offline
Newbie Poster

cfgrid inside an HTML table... possible?

 
0
  #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:

  1. <html>
  2. <body>
  3. <table>
  4. <tr>
  5. <td> some title </td>
  6. </tr>
  7. <tr>
  8. <td>
  9. <cfquery name="getEmp" datasource="MYDSN">
  10. select * from emp
  11. </cfquery>
  12.  
  13. <cfform format="flash" skin="haloSilver">
  14.  
  15. <cfgrid name="empGrid" query="getEmp" rowheaders="false">
  16. <cfgridcolumn name="First" header="First Name" width="120">
  17. <cfgridcolumn name="Last" header="Last Name" width="120">
  18. </cfgrid>
  19.  
  20. </cfform>
  21. </td>
  22. </tr>
  23. </table>
  24. </body>
  25. </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
Reply With Quote Quick reply to this message  
Join Date: Jul 2007
Posts: 2
Reputation: xfreyje is an unknown quantity at this point 
Solved Threads: 0
xfreyje xfreyje is offline Offline
Newbie Poster

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

 
0
  #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 Quick reply to this message  
Join Date: Jul 2007
Posts: 2
Reputation: ibmwaseem is an unknown quantity at this point 
Solved Threads: 0
ibmwaseem ibmwaseem is offline Offline
Newbie Poster

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

 
0
  #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
  1. <html>
  2. <cfquery name="getEmp" datasource="#application.dsn#">
  3. select * from emp
  4. </cfquery>
  5. <body>
  6. <table>
  7. <tr>
  8. <td> some title </td>
  9. </tr>
  10. <tr>
  11. <td>
  12.  
  13.  
  14. <cfform format="flash" skin="haloSilver">
  15.  
  16. <cfoutput>
  17. <cfgrid name="empGrid" query="getEmp" rowheaders="false">
  18. <cfgridrow data="firstname" >
  19. <cfgridcolumn display="yes" name="firstname" header="First Name" width="120">
  20. <cfgridcolumn name="lastname" header="Last Name" width="120">
  21. </cfgrid>
  22. </cfoutput>
  23. </cfform>
  24. </td>
  25. </tr>
  26. </table>
  27. </body>
  28. </html>
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC