0 Replies Latest reply on Jun 11, 2010 10:35 AM by dtharpe1

    CFGRID wont display data???

    dtharpe1

      Hello,

           My CFGRID is binded with my cfc i wrote and is not displaying any data. The AJAX debugger window says it is getting the data from the database but is not outputting them into the grid. And when i run the AJAX debugger window there are no errors present any help would be so much appreciated.

      Thanks,

      Heres the code....

       

      pen_budget.cfm

      <cfset todayDate = Now()>
      <cfajaximport tags="cfgrid, cfform">

       

      <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
      <html>
      <head>
      <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
      <title></title>
      <link type="text/css" href="../../assets/pcrsp.css" rel="stylesheet" media="screen" />
      </head>
          <body>
          <div id="main">
          <img src="../../assets/images/pcrsplogo.jpg" alt="pcrsplogo" width="150" height="150" />
          <h3></h3>
          <cfoutput>
          <p>As of #DateFormat(todayDate, "mm/dd/yyyy")#</p>
          </cfoutput>
          <cfform>
          <cfgrid name="budget_pen_grid" selectMode="Row" width="100%" format="html" pagesize="30" striperows="yes" bind="cfc:pending_budget.browse({cfgridpage},
                                  {cfgridpagesize},
                                      {cfgridsortcolumn},
                                          {cfgridsortdirection})" bindOnLoad="yes">
             
              <cfgridcolumn name="transactionid" header="Transaction ID" width="100" headerTextColor="green">
              <cfgridcolumn name="projectid" header="Project ID" width="100" headerTextColor="green" display="yes">
              <cfgridcolumn name="country" header="CostCenter Country" width="300" headerTextColor="green" display="yes">
              <cfgridcolumn name="submitdate" header="Submitted Date" width="100" headerTextColor="green" display="yes">
              <cfgridcolumn name="approvaldate" header="Approval Date" width="100" headerTextColor="green" display="yes">
         
          </cfgrid>
          </cfform>
          </div>
             
          </body>
      </html>

       

      pen_budget.cfc

      <cffunction name="browse"
                  access="remote"
                  returnType="struct">
                 
                  <cfargument name="page"
                              type="numeric"
                              required="yes">
                             
                  <cfargument name="pageSize"
                              type="numeric"
                              required="yes">
                             
                  <cfargument name="gridsortcolumn"
                              type="string"
                              required="yes">
                             
                   <cfargument name="gridsortdirection"
                               type="string"
                               required="yes">
                              
                   <cfset var budgets="">
                  
          `<cfif arguments.gridsortcolumn eq "">
                  <cfset arguments.gridsortcolumn = "Transactionid" />
                  <cfset arguments.gridsortdirection = "asc" />
            </cfif>
                  
               <cfquery dataSource="fiscal3" name="pen_bud">
                   SELECT Transactionid, Transactions.projectid, country, submitdate, submitted, approvaldate, final
                  FROM Transactions, CostCenters
                  Where submitted = 1
                   Order by  #arguments.gridsortcolumn# #arguments.gridsortdirection#
               </cfquery>
                  
                   <cfreturn QueryConvertForGrid(pen_bud,
                                                   ARGUMENTS.page,
                                                   ARGUMENTS.pageSize)>

       

      </cffunction>