1 Reply Latest reply on Sep 13, 2009 9:09 AM by BKBK

    CFGrid and checkboxes

    akkraus


      I have included the code.  My problem is that I am always getting the error exception thrown and not caught despite adding cftry/cfcatch blocks.  If I don't set selectmode="edit" and include OnChange my grid displays except I get the word false displayed instead of a checkbox.

       

      <cfgrid format="html"  name="grid_Tables" pagesize="10" autowidth="true" striperows="yes" width = "99%" selectmode="edit" bind="CFC:qry_GetUser.getAllUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{cfgridsortdirection})"onchange="cfc:qry_GetUser.editData({cfgridaction},{cfgridrow},{cfgridchanged})">
        
      <cfgridcolumn name="UserID" display="No"/>
        
      <cfgridcolumn name="opt" header="" type="boolean" width="46"/>
        
      <cfgridcolumn name="Name" header="Name" width="150" type="string_nocase" select="no" />
        
      <cfgridcolumn name="Email" header="EMail" width="150" type="string_nocase" select="no" />
        
      <cfgridcolumn name="RegistrationDate" header="Registration Date" width="150" type="string_nocase" select="no" />
      </cfgrid>

      <cffunction name="editData" access="remote">
                     
      <cfargument name="gridaction" required="yes">
                     
      <cfargument name="gridrow" required="yes" type="Struct">
                     
      <cfargument name="gridchanged" required="yes" type="Struct">
                      
             
      </cffunction>

      The problem is that in edit mode I get an error thrown so the grid
      doesn't display at all.  I am wondering if I have a problem with:

      onchange="cfc:qry_GetUser.editData({cfgridaction},{cfgridrow},{cfgridchanged})

       

      Right now the editData function does nothing it is empty yet an error is still being thrown.  I haven't been able to figure out where the error is being thrown.  I have added catch/try blocks around the cfgrid as well as in the editData function but nothing is caught.