Question
cfgrid and binding checkboxes
Hello,
I have about 10 checkboxes that I would like to show as checked or unchecked in a cfform. The cfgrid does not need to show the checkboxes. So I have 3 columns in my cfgrid (firstName,lastName,company) these all bind just fine to cfinput type="text". There are 10 bit/boolean columns in the same database table that I need binded to my form. When I selected a record the forms update fine with the following code.
<cfinput type="text" name="firstname" label="First"
bind="{membersGrid.dataProvider[membersGrid.selectedIndex]['FirstName']}"
onChange="membersGrid.dataProvider.editField(membersGrid.selectedIndex, 'FIRSTNAME', firstname.text);">
But when trying to do something similiar for a cfinput type of checkbox I get no where.
Any assistance would be greatly appreciated.
Thanks,
Ryan
I have about 10 checkboxes that I would like to show as checked or unchecked in a cfform. The cfgrid does not need to show the checkboxes. So I have 3 columns in my cfgrid (firstName,lastName,company) these all bind just fine to cfinput type="text". There are 10 bit/boolean columns in the same database table that I need binded to my form. When I selected a record the forms update fine with the following code.
<cfinput type="text" name="firstname" label="First"
bind="{membersGrid.dataProvider[membersGrid.selectedIndex]['FirstName']}"
onChange="membersGrid.dataProvider.editField(membersGrid.selectedIndex, 'FIRSTNAME', firstname.text);">
But when trying to do something similiar for a cfinput type of checkbox I get no where.
Any assistance would be greatly appreciated.
Thanks,
Ryan