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

HTML CFGRID not passing all modified values

Participant ,
Dec 19, 2012 Dec 19, 2012

I've got an HTML type CFGRID (using CF10) and keep running into this issue where it's not passing all the fields that I modify.  Say I have 5 rows, and I modify the same 3 columns in all 5 rows (entering prices).  All 15 cells get the little red modified indicator, but when I submit the form, the resulting form variables don't contain all the changes.  I'm dumping out the form object, and looking at the "grid.rowstatus.action" array to find which rows need updating, as well as the individual arrays containing each column's data.

I can't see any pattern to why it sometimes omits rows or even just cells I've modified.  And it's not always the same, and sometimes it gets it right.  I haven't been able to find any references to similar behavior, so I'm kind of stumped, and at this point, I may have to ditch the cfgrid and try a JQuery grid of some sort to see if it works better.

Anyone have any ideas?

3.8K
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 ,
Dec 22, 2012 Dec 22, 2012

Could we see how you define the grid tag(s), including attributes?

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
New Here ,
Mar 06, 2013 Mar 06, 2013

Same Problem.

Because of recent Java security issues we decided to change the format of our controls from applet to html. Thus our client doesn’t need the JRE anymore.

We used the cftree and the cfgrid control. The format change of the cftree-control was not as easy as expected, but after several hours we fixed the display of the control. Now it works fine. By the way that was not our understanding of rapid prototyping.

The change of the cfgrid control was quite easy, just changing the format and adjusting some parameters. Looks fine and ready to use. But we have encountered serious problems, which we are unable to fix. Like in http://forums.adobe.com/message/5077649#5077649 and http://forums.adobe.com/message/4606378#4606378 mentions, not all modified values are transferred to the actionpage.

It seems that modified checkboxes are transferring data in the right way, but changes to a dropdown, or text cells does not always force the modified dataset to be sent. In some cases even a wrong data row is sent.

We are using CF902 and will be migrating to CF10, tests with CF10 show the same behaviour.

We would greatly appreciate a solution for this issue.

For further research here is a sample of a self running demo code.

<!doctype html public "-//W3C//DTD HTML 4.0 Transitional//EN">
<html>
<head>
<title>Gridtest</title>
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="expires" content="0">
</head>
<body>

<!--- Display Formparameter --->
Form.Var: <cfdump var="#Form#">


<!--- Action ---> 
<cfif isdefined("Form.Teilnehmerliste.RowStatus.Action")>
<cfloop index="x" from="1" to="#arraylen(Form.Teilnehmerliste.RowStatus.Action)#">
  <!--- Datenbank aktualisieren --->
  <cfif #Form.Teilnehmerliste.RowStatus.Action# eq 'U'>
   update <br>
  <cfelseif #Form.Teilnehmerliste.RowStatus.Action# eq 'I'>
   <!--- Insert --->
  <cfelse>
   <!--- Delete --->
  </cfif>
</cfloop>
<cfabort>
</cfif><!---  isdefined("Form.Teilnehmerliste.RowStatus.Action") --->


<!--- Make a query of 5 records --->
<cfset xtnliste = QueryNew("Personalnummer,Anmeldung_ID,Termine_ID,Name,Vorname,Status,Tage,Privatanschrift")>
<!--- 1 --->
<cfset temp = QueryAddRow(xtnliste)>
<cfset temp = QuerySetCell(xtnliste, "Personalnummer", "0000015")>
<cfset temp = QuerySetCell(xtnliste, "Anmeldung_ID", 54282)>
<cfset temp = QuerySetCell(xtnliste, "Termine_ID", 4711)>
<cfset temp = QuerySetCell(xtnliste, "Name", "Name1")>
<cfset temp = QuerySetCell(xtnliste, "Vorname", "Petra")>
<cfset temp = QuerySetCell(xtnliste, "Status", "Z")>
<cfset temp = QuerySetCell(xtnliste, "Tage", 35)>
<cfset temp = QuerySetCell(xtnliste, "Privatanschrift", 1)>
<!--- 2 --->
<cfset temp = QueryAddRow(xtnliste)>
<cfset temp = QuerySetCell(xtnliste, "Personalnummer", "0004015")>
<cfset temp = QuerySetCell(xtnliste, "Anmeldung_ID", 55152)>
<cfset temp = QuerySetCell(xtnliste, "Termine_ID", 4711)>
<cfset temp = QuerySetCell(xtnliste, "Name", "Name2")>
<cfset temp = QuerySetCell(xtnliste, "Vorname", "Anja")>
<cfset temp = QuerySetCell(xtnliste, "Status", "Z")>
<cfset temp = QuerySetCell(xtnliste, "Tage", 41)>
<cfset temp = QuerySetCell(xtnliste, "Privatanschrift", 0)>
<!--- 3 --->
<cfset temp = QueryAddRow(xtnliste)>
<cfset temp = QuerySetCell(xtnliste, "Personalnummer", "2565210")>
<cfset temp = QuerySetCell(xtnliste, "Anmeldung_ID", 55153)>
<cfset temp = QuerySetCell(xtnliste, "Termine_ID", 4711)>
<cfset temp = QuerySetCell(xtnliste, "Name", "Name3")>
<cfset temp = QuerySetCell(xtnliste, "Vorname", "Holgi")>
<cfset temp = QuerySetCell(xtnliste, "Status", "W")>
<cfset temp = QuerySetCell(xtnliste, "Tage", 0)>
<cfset temp = QuerySetCell(xtnliste, "Privatanschrift", 0)>
<!--- 4 --->
<cfset temp = QueryAddRow(xtnliste)>
<cfset temp = QuerySetCell(xtnliste, "Personalnummer", "2577210")>
<cfset temp = QuerySetCell(xtnliste, "Anmeldung_ID", 55157)>
<cfset temp = QuerySetCell(xtnliste, "Termine_ID", 4711)>
<cfset temp = QuerySetCell(xtnliste, "Name", "Name4")>
<cfset temp = QuerySetCell(xtnliste, "Vorname", "Hilde")>
<cfset temp = QuerySetCell(xtnliste, "Status", "B")>
<cfset temp = QuerySetCell(xtnliste, "Tage", 0)>
<cfset temp = QuerySetCell(xtnliste, "Privatanschrift", 0)>
<!--- 5 --->
<cfset temp = QueryAddRow(xtnliste)>
<cfset temp = QuerySetCell(xtnliste, "Personalnummer", "2333585")>
<cfset temp = QuerySetCell(xtnliste, "Anmeldung_ID", 55200)>
<cfset temp = QuerySetCell(xtnliste, "Termine_ID", 4711)>
<cfset temp = QuerySetCell(xtnliste, "Name", "Name5")>
<cfset temp = QuerySetCell(xtnliste, "Vorname", "Peter")>
<cfset temp = QuerySetCell(xtnliste, "Status", "Z")>
<cfset temp = QuerySetCell(xtnliste, "Tage", 10)>
<cfset temp = QuerySetCell(xtnliste, "Privatanschrift", 0)>

<!--- Display Form --->

<cfform action="gridtest.cfm" method="post" target="_blank" name="teilnehmer">

<cfgrid name="Teilnehmerliste"
format="html"
query="xtnliste"
title="Teilnehmerliste"
width="600" height="180"
insert="no" delete="no" sort="no"
bold="No" italic="No"
appendkey="yes"  highlighthref="No"
griddataalign="left" gridlines="Yes" bgcolor="##ffffff" stripeRows="yes" stripeRowColor="##ededed"<!---  onValidate="Grid_Val"  --->
rowheaders="no" rowheaderalign="right" rowheaderitalic="No" rowheaderbold="No"
colheaders="Yes" colheaderalign="center" colheaderitalic="No" colheaderbold="No" <!--- onError="Grid_Error" --->
selectcolor="##dde3eb" selectmode="edit" picturebar="No" autowidth="yes">
<!--- Spalten definieren --->
    <cfgridcolumn name="Personalnummer" dataalign="LEFT" bold="yes" italic="No" select="No" display="yes" headerbold="No" headeritalic="No">
<cfgridcolumn name="Anmeldung_ID" dataalign="LEFT" bold="yes" italic="No" select="No" display="yes" headerbold="No" headeritalic="No">
<cfgridcolumn name="Termine_ID" dataalign="LEFT" bold="yes" italic="No" select="No" display="no" headerbold="No" headeritalic="No">
<cfgridcolumn fontsize="11" name="Name" dataalign="LEFT" bold="No" italic="No" select="no" display="yes" headerbold="No" headeritalic="No" href="data.cfm" hrefkey="Personalnummer" target="_self">
<cfgridcolumn fontsize="11" name="Vorname" dataalign="LEFT" bold="No" italic="No" select="no" display="yes" headerbold="No" headeritalic="No">
<cfgridcolumn fontsize="11" name="Status" dataalign="LEFT" bold="No" italic="No" select="yes" display="yes" headerbold="No" headeritalic="No" values="B,Z,W,R,A" valuesdisplay="Bewerbung, Zugelassen, Warteliste, Rueckzug, Abgelehnt" valuesdelimiter=",">
    <cfgridcolumn width="50" fontsize="11" name="Tage" dataalign="RIGHT" bold="No" italic="No" select="yes" display="yes" headerbold="No" headeritalic="No" type="numeric">
<cfgridcolumn name="Privatanschrift" header="Privat" dataalign="LEFT" bold="No" italic="No" select="yes" display="yes" headerbold="No" headeritalic="No" type="boolean">
</cfgrid>

<input type="submit" value="Änderungen speichern">

</cfform>

</body>
</html>

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
New Here ,
Mar 19, 2013 Mar 19, 2013

Not sure if this was your issue but I have the same problem and have narrowed it down to how you exit the cell you just edited. If you tab or enter it assigns the data properly but if you click with the mouse on another field it seems the data you entered gets marked internally to the field you just clicked to.

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
New Here ,
Mar 19, 2013 Mar 19, 2013

Did you ever figure this out?

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
New Here ,
Mar 20, 2013 Mar 20, 2013
LATEST

That's exactly the same behaviour we experience, and describes the problem very well.

Looking in the manual (cfgrid), there is a Note "...Adobe recommends that after user updates data in a cell, they click another cell before submitting the form."

Meanwhile i put that issue on the bug-tracklist.

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
Mentor ,
Feb 15, 2013 Feb 15, 2013

I have the same issue, did you solveD?

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