|
Mailing Lists
|
Home /
Groups /
ColdFusion Talk (CF-Talk)
ColdFusion 8 HTML CFGRID with checkbox possible with binding?
I've been banging my head against the wall and searching for the last couple of hours of how to add a column for a checkbox on a cfgrid in html that is using binding on CF8 (not beta). Any help is greatly appreciated.Chris Martin 08/13/07 04:42 P Did you every solve this?Shy Boy 09/05/07 10:14 A I did get the checkbox to showup, however, it initally shows a "true" orChris Martin 09/05/07 10:36 A what code did u use to show the checkbox in cfgrid?Asim . 09/05/07 11:00 A If you are calling the query from <cfgrid> tag, do this:Chris Martin 09/05/07 11:19 A Thanks for your quick reply. This was the first thing I tried.Asim . 09/05/07 11:24 A AND if I use the real column name and use the use the parameter select="yes" that doesn't even show the checkbox, it just display the column there..Asim . 09/05/07 11:40 A Right...click on it three times...you'll see it....unfortunately that'sChris Martin 09/05/07 12:00 P I am working on the same thing right now. I have success getting theEron Cohen 09/06/07 01:16 P Yeah...You have to make the column in your table for that and i resetChris Martin 09/05/07 11:49 A Ok, I solved my error issue--I just needed to remove the semicolon from the end of "onClick=form.submit();"--So now I have checkboxes that submit the form when checked inside of an HTML grid on CF8.Eron Cohen 09/07/07 02:26 A In the cfc that i return the query, i just added a columnhenry ho 02/03/08 03:47 P bumpAsim . 04/30/08 07:49 A bumpAsim . 04/30/08 07:50 A If your cfgrid is marked as selectMode='edit', and your cfgridcolumn hasCutter (CFRelated) 04/30/08 08:52 A So are the docs wrong? Because that's not what happens.John Bliss 10/28/08 04:13 P I've been banging my head against the wall and searching for the last couple of hours of how to add a column for a checkbox on a cfgrid in html that is using binding on CF8 (not beta). Any help is greatly appreciated. Did you every solve this? > I've been banging my head against the wall and searching for the last > couple of hours of how to add a column for a checkbox on a cfgrid in > html that is using binding on CF8 (not beta). Any help is greatly > appreciated. I did get the checkbox to showup, however, it initally shows a "true" or "false" in the column rather than a checkbox. Upon clicking the cell three times, a checkbox finally appears, and can then be changed using ajax/cfc. I ended up doing a flash grid...i think this may be a bug with HTML bound grids. Chris Martin Shy Boy wrote: ----- Excess quoted text cut - see Original Post for more ----- what code did u use to show the checkbox in cfgrid? when i use <cfinput type="checkbox" name="checkboxname"> inside the cfgrid it just display the checkbox once. I am using cfgrid with query. Thanks, ----- Excess quoted text cut - see Original Post for more ----- If you are calling the query from <cfgrid> tag, do this: <cfgridcolumn name="printThis" header="Select" width="50" select="yes" type="boolean" display="yes"> Chris Martin Asim . wrote: ----- Excess quoted text cut - see Original Post for more ----- Thanks for your quick reply. This was the first thing I tried. The error is Query column invalid or missing. You must specify the name of a column in the qryGetStuff query for the printThis attribute of the CFGRIDCOLUMN tag digging the documents but found nothing, google search didn't help either. I hope someone used it here who can help. Thanks, ----- Excess quoted text cut - see Original Post for more ----- AND if I use the real column name and use the use the parameter select="yes" that doesn't even show the checkbox, it just display the column there.. ----- Excess quoted text cut - see Original Post for more ----- Right...click on it three times...you'll see it....unfortunately that's the way it works in the HTML grid. Chris Martin ------------------------------------------- Gandy Ink Information Technology Department cmartin@gandyink.com (325) 949-7864 X-364 ------------------------------------------- www.gandyink.com Asim . wrote: ----- Excess quoted text cut - see Original Post for more ----- I am working on the same thing right now. I have success getting the checkbox to show up. That much is no problem. The way I am doing it is by using QueryNew/QuerySetCell to create a query that I send back to the CFGRID via binding to a CFC. Here is how I am creating my checkbox: <CFSET QuerySetCell(searchResults, "test","Complete: <input type=checkbox name=install_complete_date value=#dateformat(now(),"mm/dd/yyyy")# onClick=form.submit();>)> I want to set it up so that when the checkbox is checked, the form is submitted automatically. Unfortunately, when the checkbox is checked, the form does submit, but I am getting a mysterious Error: The submitted cfgrid form field is corrupt (name: __CFGRID__CFFORM_1__FIRSTGRID value: __CFGRID__COLUMN__=ROW; __CFGRID__DATA__=5; ... I have no idea what this is about or why its happening. Anyone have any guesses? I think I have alot to learn about CFGRID. Thank you. ----- Excess quoted text cut - see Original Post for more ----- Yeah...You have to make the column in your table for that and i reset the values back to 0 each time the application is ran. Chris Martin Asim . wrote: ----- Excess quoted text cut - see Original Post for more ----- I am working on the same thing right now. I have success getting the checkbox to show up. That much is no problem. The way I am doing it is by using QueryNew/QuerySetCell to create a query that I send back to the CFGRID via binding to a CFC. Here is how I am creating my checkbox: <CFSET QuerySetCell(searchResults, "test","Complete: <input type=checkbox name=install_complete_date value=#dateformat(now(),"mm/dd/yyyy")# onClick=form.submit();>)> I want to set it up so that when the checkbox is checked, the form is submitted automatically. Unfortunately, when the checkbox is checked, the form does submit, but I am getting a mysterious Error: The submitted cfgrid form field is corrupt (name: __CFGRID__CFFORM_1__FIRSTGRID value: __CFGRID__COLUMN__=ROW; __CFGRID__DATA__=5; ... I have no idea what this is about or why its happening. Anyone have any guesses? I think I have alot to learn about CFGRID. Thank you. ----- Excess quoted text cut - see Original Post for more ----- Ok, I solved my error issue--I just needed to remove the semicolon from the end of "onClick=form.submit();"--So now I have checkboxes that submit the form when checked inside of an HTML grid on CF8. ----- Excess quoted text cut - see Original Post for more ----- In the cfc that i return the query, i just added a column <cfset array = [true,false]> <cfset queryAddcolumn(qry, 'checkbox', 'bit', array> and in the cfgrid, i bind to the cfc, and i use the following <cfgridcolumn> <cfgridcolumn name='checkbox' header='test' type='boolean' display='true' select='true'> the checkbox still doesn't show up, no matter after how many clicks, in FF2 and IE6. Any idea how to make the checkbox show up? do I have to write my own Ext renderer? THANKS! bump anyone solved this yet??? ----- Excess quoted text cut - see Original Post for more ----- bump anyone solved this yet??? ----- Excess quoted text cut - see Original Post for more ----- If your cfgrid is marked as selectMode='edit', and your cfgridcolumn has a type='boolean' (and the cell is editable, which should be the default), then the docs say: boolean: column displays as check box; if cell is editable, user can change the check mark. Steve "Cutter" Blades Adobe Certified Professional Advanced Macromedia ColdFusion MX 7 Developer _____________________________ http://blog.cutterscrossing.com Asim . wrote: ----- Excess quoted text cut - see Original Post for more ----- So are the docs wrong? Because that's not what happens. ----- Excess quoted text cut - see Original Post for more -----
|
May 24, 2012
|
Latest Fusion Authority Articles
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||