datagrid: add rows in CloseFieldEditor

Trevor DeVore lists at mangomultimedia.com
Thu Dec 30 14:38:42 EST 2010


On Thu, Dec 30, 2010 at 2:25 PM, JosepM <jmyepes at mac.com> wrote:

>
> Nop. I'm seeing that is a problem of refresh the datagrid, so after
> dispatch
> "addLine" and add manually a row all the data appear.
>
> ResetList doesn't work but with RefreshList now seems that work. Why
> ResetList don't work?
>

ResetList is going to wipe out all of the controls in the data grid. The
engine does not like you to delete objects that are the target of the
current event. I imagine that is why it doesn't work. I don't think
RefreshList deletes controls.


> To reference to next row from the actual is better use
>
> SetDataOfIndex the dgindex of me+1, "COL1", "Text of the Col"
>
> or can be a problem with datagrid index?
>

Hmm, I think this might cause problems. The data grid won't throw an error
if you try to assign data to an index that you haven't added but I also
don't think it will update the total height of the data in the grid which
AddData will do. This may cause problems when scrolling through your data
later on.

-- 

Trevor DeVore

Blue Mango Learning Systems

ScreenSteps: http://www.screensteps.com

Releasable Revolution Resources for Developers:
http://revolution.bluemangolearning.com



More information about the Use-livecode mailing list