David, after play a little with the flash forms what I can tell you is
to not let the user make more than one kind of modification (if they
update don´t let them insert or delete, and so on). Another bug is try
to edit some row, than click in another row, don´t update it and send
the form you gonna see that the form.gridname structure isn´t an
array. What I do is use this code to insert and delete rows.
<cfsavecontent variable="actionInsert">
GridData.insertRow(myGrid);
_global.backupDP.push(myGrid.getItemAt(myGrid.length -1));
remove.enabled=false;
</cfsavecontent>
<cfsavecontent variable="actionDelete">
var item = myGrid.selectedItem;
if(_global.backupDP != undefined)
{
for(var i = 0; i < _global.backupDP.length; i++)
{
if(_global.backupDP[i] == item)
{
_global.backupDP.removeItemAt(i);
}
}
}
GridData.deleteRow(myGrid);
inser.enabled=false;
</cfsavecontent>
<cfinput type="button" name="inser" value="Add" onclick="#actionInsert#"/>
<cfinput type="button" name="remove" value="Delete"
onclick="#actionDelete# "/>
With this, your user wont be able to insert and delete rows without
refreshing the form, but to prevent the second bug i mentioned, you
will need to make some changes in your form, insted of letting your
user edit in the grid, bind some text fields to the grid and set your
selectmode to browse in the grid, than put a {btn_send.enabled =
false;} in the onchange atribute of your grid (if your send button is
named btn_send). And in the onchange of the text input fields put
btn_send.enabled = true; after the code to edit the grid.
This sould take care of those two bugs in the cfgrid in flash format.
Felipe
On 8/23/05, David Brown <[EMAIL PROTECTED]> wrote:
> We are using Flash forms with a cfgrid on it. The grid is in edit mode. I
> have my cfc working now and I am able to update/delete/insert based on the
> cfgridname.rowstatus.action[counter] value.
>
> But I have found an error or bug not sure.
>
> I bring up the grid with data from a query 2 rows. I then insert a new row
> in the grid and add content. I then delete the first row that was returned
> (original data) and then edit the 2nd row (now the first row since the first
> was deleted) data.
>
> I cfdump form[gridname] & ".rowstatus.action"] and see 3 elements in the
> array in the following order [u][d][I]. the value of the original primary
> key column of the [U] row is empty. If I don't delete a row in the grid then
> the value of the original primary key column is correct.
>
> Has anyone see this?
>
> I can provide the code if needed.
>
> David
>
>
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Logware (www.logware.us): a new and convenient web-based time tracking
application. Start tracking and documenting hours spent on a project or with a
client with Logware today. Try it for free with a 15 day trial account.
http://www.houseoffusion.com/banners/view.cfm?bannerid=67
Message: http://www.houseoffusion.com/lists.cfm/link=i:4:216230
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=11502.10531.4
Donations & Support: http://www.houseoffusion.com/tiny.cfm/54