Datagrid woes

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Simon Knight
Posts: 854
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Datagrid woes

Post by Simon Knight » Mon May 05, 2014 9:10 am

A number of similar datagrids were working but have now stopped. The grids are all table types and use a check box to display a true/false value. The use of the checkbox is described in a lesson which I followed. It seems that the column has become disconnected from its column behavior button (stored on the datagrid template), the problem is that the inspector does not allow me to add a new behavior nor will it allow me to edit the existing one. Is there a way to recover from this apart from creating a new datagrid?

best wishes

Simon
best wishes
Skids

CenturyMan1979
Posts: 86
Joined: Tue May 15, 2012 5:56 pm
Location: Minneapolis, MN

Re: Datagrid woes

Post by CenturyMan1979 » Tue May 06, 2014 3:21 am

If you get an answer on this I would love to know it as well. Every time I get in this situation the only thing I have gotten to work is re-create a new data grid. You can save some time by creating the data grid and then copy and paste the items from your old data grid row template into the new one. Then copy over the code and delete the old data grid instance.

Simon Knight
Posts: 854
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Datagrid woes

Post by Simon Knight » Mon May 12, 2014 7:04 pm

Hi CenturyMan1979,

I'm sorry for the delay in getting back to this thread - I was busy trying to deliver a working application for last Friday . I had a horrible time trying to fix datagrids that just stopped working. In every case the datagrid worked for a while and then stopped. The problem with the column behavior occurred in the same way. I resorted to deleting every datagrid along with the template stack then adding them back in. I kept them as simple as possible i.e as near to the vanilla datagrid I just added a script to the group to read the dghilited line. The database went live on Friday with 20 users and by Saturday the principle datagrid had broken and was returning the wrong line of data when clicked. This meant that the wrong record id was being used in queries to find related data - click on a team name and the members of a different team were displayed, or click on a team and change its status only to have the status added to a different team. All very frustrating. Thankfully I managed to bodge my code and prevent serious corruption of the data but it was hard work.

I have long suspected that there are bugs in the datagrid but was never confident enough to raise a bug as I did not understand them. However, I have raised a bug report No. 12395 and have decided that I shall stop using datagrids in my applications until I am confident that the bugs have been eliminated.

I thank you for your post as it confirms that I am not a lone voice, and I urge others to add bug reports.

best wishes

Simon K
best wishes
Skids

Simon Knight
Posts: 854
Joined: Wed Nov 04, 2009 11:41 am
Location: Gunthorpe, North Lincs, UK

Re: Datagrid woes

Post by Simon Knight » Tue May 13, 2014 7:39 pm

This is a correction and partial retraction. The problem of the wrong index being passed is false and self inflicted I used the wrong command I should have used

Code: Select all

  put the dgDataOfIndex[pHilitedIndex] of me into tRecA
as Klaus who spotted my error states "line <>index". My code appeared to work when the data was aligned with the rows of the grid.

However, I don't believe that I broke the datagrid that stopped using a column template and I wonder if it is connected with a problem I had setting a card to a button behavior.

Simon
best wishes
Skids

Post Reply

Return to “Talking LiveCode”