Unexpected problem with datagrid

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Unexpected problem with datagrid

Post by Simon Knight » Thu Apr 24, 2014 10:05 am

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
best wishes
Skids

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Unexpected problem with datagrid

Post by Klaus » Thu Apr 24, 2014 10:56 am

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

Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Re: Unexpected problem with datagrid

Post by Simon Knight » Fri Apr 25, 2014 8:35 am

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.
Screenshot_Of_DataGridProblemtiff.png
Editing a datagrid cell
Any ideas ?

Thanks

Simon K
best wishes
Skids

Simon Knight
Posts: 919
Joined: Wed Nov 04, 2009 11:41 am

Re: Unexpected problem with datagrid

Post by Simon Knight » Fri Apr 25, 2014 10:27 am

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
best wishes
Skids

Klaus
Posts: 14199
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Unexpected problem with datagrid

Post by Klaus » Fri Apr 25, 2014 10:37 am

:D


Your message contains 2 characters. The minimum number of characters you need to enter is 10.

Post Reply