New Row into datagrid and edit field

Trevor DeVore lists at mangomultimedia.com
Fri Jun 10 08:36:01 EDT 2011


On Thu, Jun 9, 2011 at 5:57 AM, Alessandro Pisoni
<alessandro at system-ini.it>wrote:

> I have a button that creates a row in my datagrid but I would be
> automatically moves to the specific field in that row. how can I do?
>
> on mouseup
>   put the dgNumberOfLines of group "ElencoTelefoni" + 1 into theLineNo
>   dispatch "addLine" to group "ElencoTelefoni" with theRowData,
> theDataColumns, theLineNo
>  ??????????
>
> end mouseup
>

Use EditKey or EditKeyOfIndex.

dispatch "EditKey" to group "ElencoTelefoni" with "FieldName", theLineNo

Doing so will trigger the EditValue message in your row behavior and you can
then open the field for editing.

Take a look at this lesson for more info.

http://lessons.runrev.com/spaces/lessons/manuals/datagrid/lessons/7336-How-Can-The-User-Edit-Field-Content-in-a-Data-Grid-Form-

-- 
Trevor DeVore
Blue Mango Learning Systems

LiveCode Resources for Developers: http://livecode.bluemangolearning.com



More information about the use-livecode mailing list