Page 1 of 1
Unexpected problem with datagrid
Posted: Thu Apr 24, 2014 10:05 am
by Simon Knight
My project started in LC version 6.6.1 but I have fallen back to version 6.5. I have just added another datagrid and find that I am unable to edit an empty cell in the grid, i.e. if I have my blank datagrid I am unable to add new data. I have added date using code and I am able to edit the single row I added but am still unable to add new rows. The grid does have a single column behavior that is used to control a check box. I have confirmed that I am unable to add data in a vanilla datagrid and yes the "Allow text editing" is ticked in the inspector.
All the datagrids added earlier do allow data to be added and I don't think that I have done anything different except that I am using a slightly older version of Livecode.
This has to be a "simple school boy error" but what ? Any ideas?
Simon K
Re: Unexpected problem with datagrid
Posted: Thu Apr 24, 2014 10:56 am
by Klaus
Hi Simon,
not sure I understand your problem, but no, you cannot add new data
to a datagrid by doubleclicking a cell, if the datagrid/row is EMPTY.
You need to add a new row(s) via script, even if the data are empty.
Use "adddata" or "addline" to add data to your datagrid.
Best
Klaus
Re: Unexpected problem with datagrid
Posted: Fri Apr 25, 2014 8:35 am
by Simon Knight
Hi Klaus,
I have been burning the mid night oil so must have made a simple error but..... I have two data grids one above the other on a card. The first was created a while ago the second yesterday. Both are displaying data and both appear to have the same settings when viewed in the inspector.
If I double click in a cell in an empty row the first datagrid it allows me to enter data whereas the second does not. I don't remember modifying the first datagrid to enable this feature. I have enclosed a screen shot of the two grids which shows the result of a double click in a cell in an empty row.

- Editing a datagrid cell
Any ideas ?
Thanks
Simon K
Re: Unexpected problem with datagrid
Posted: Fri Apr 25, 2014 10:27 am
by Simon Knight
Answering my own question:
It appears that my first datagrid contains some blank rows which give the impression that it is possible to add new rows.
Doh!
Simon K
Re: Unexpected problem with datagrid
Posted: Fri Apr 25, 2014 10:37 am
by Klaus
Your message contains 2 characters. The minimum number of characters you need to enter is 10.