Sorry for the delay, hope this can still help. The trick is not to
reference the checkbox component directly - instead you want to
reference the value of the column in the dataProvider.

Here is an example:
----------------------------------------------------------------
<cfform format="flash">
        <cfgrid name='test2'  selectmode="row" width="350" height="200"
rowHeight="20" onchange="alert('obj='
+test2.dataProvider[test2.selectedIndex]['foo']);">
                <cfgridcolumn name='one' width="100">
                <cfgridcolumn name='two' width="100">
                <cfgridcolumn name='foo' width="100" type="boolean">
                <cfgridcolumn name='image' width="20" type="image">
                <cfgridrow
data="apple1,orange1,true,http://localhost:8500/CFIDE/images/Computer.jp
g">
                <cfgridrow
data="apple2,orange2,no,http://localhost:8500/CFIDE/images/Computer.jpg";
>
                <cfgridrow
data="apple3,orange3,yes,http://localhost:8500/CFIDE/images/Computer.jpg
">
        </cfgrid>

        <cfinput type="Submit" name="foo">
</cfform>
----------------------------------------------------------------

Hth,
---nimer



-----Original Message-----
From: Jason Rogoz [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, March 30, 2005 9:48 AM
To: CF-Talk
Subject: Re: cfgridcolumn validation

Do you have the code that would reference the checkbox cfgridcolumns to
see if they are checked or not...i can't seem to find the Actionscript
syntax that would be used to reference the properties of the
checkboxes....i have a cfgridcolumn of type boolean to display the
checkbox, can i still use actionscript to reference whether it is
checked or not?
>You can write custom actionscript in the onSubmit attribute of cfform.
>With this you can write AS that will check the loop over the rows and
>check the grid, if none are checked it should return false if you don't
>want the form to be submitted.
>
>Hth,
>---nimer
>
>-----Original Message-----
>From: Jason Rogoz [mailto:[EMAIL PROTECTED] 
>Sent: Tuesday, March 29, 2005 1:11 PM
>To: CF-Talk
>Subject: cfgridcolumn validation
>
>Is it possible to validate the values in a cfgridcolumn tag...i have a
>grid displayed with a checkbox next to each item in the grid.  I want
to
>ensure that at least one checkbox is checked when the user clicks a
>button before moving onto my action page.
>
>Thanks



~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Discover CFTicket - The leading ColdFusion Help Desk and Trouble 
Ticket application

http://www.houseoffusion.com/banners/view.cfm?bannerid=48

Message: http://www.houseoffusion.com/lists.cfm/link=i:4:203158
Archives: http://www.houseoffusion.com/cf_lists/threads.cfm/4
Subscription: http://www.houseoffusion.com/lists.cfm/link=s:4
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54

Reply via email to