Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

CFGrid and checkboxes

Guest
Sep 11, 2009 Sep 11, 2009


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.

					
				
			
			
				
			
			
			
			
			
			
			
		
TOPICS
Advanced techniques
637
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Sep 13, 2009 Sep 13, 2009
LATEST
bind="CFC:qry_GetUser.getAllUsers({cfgridpage},{cfgridpagesize},{cfgridsortcolumn},{c fgridsortdirection})"

I don't know what effect it may have, but I would remove the space for a start.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources