Page 1 of 1

DataGrid Row Template Verification

Posted: Thu May 23, 2013 2:05 am
by Gage
Hello again, RunRev forum users.

I'm back with another useful question about DataGrids.

I have occasionally had the issue on some of my stacks of having an ineffective Row Behavior button in the Property Inspector. It is usually also the case that when I manually bring up the Behavior Script button and code it, that setting the dgData of the DataGrid group does not call the Behavior Script.

I am suspecting that, somehow, the DataGrid on my card has been disconnected with the Row Template that was generated in the template substack LiveCode creates.

Now that you know what I am experiencing, my question is this: Is there a way to verify which Row Template card in a substack corresponds to each DataGrid in the mainstack?

Phil E.

Re: DataGrid Row Template Verification

Posted: Thu May 23, 2013 2:37 am
by Gage
So I realized that you can just go to the DG group's Property Inspector and click Row Template to bring up the template, and then ID it by looking at the card Property Inspector.

However, this doesn't solve anything. I'm just trying to discover ways to troubleshoot why my Behavior Script isn't being called when the DataGrid's dgData is set. I have a breakpoint set in the Behavior Script code so I can monitor variables, but it never gets activated, nor my data does not render.


Mystified,
Phil

Re: DataGrid Row Template Verification

Posted: Mon May 27, 2013 3:57 am
by Gage
So, after a few days of producing successful datagrids, I can say that there are some manner of glitches that permanently ruin a datagrid's ability to access its Behavior Script.

The bad news: I have no idea what makes this happen, and sometimes I have had to scrap the whole file and start over to get it sorted out.

The good news: starting a new file and doing everything perfectly right, while being VERY careful about moving or renaming anything LiveCode automatically generates (Behavior Script buttons, Row Template stack and cards, etc) will yield a working datagrid.

Hope that gives people motivation to keep scrapping files and learning and troubleshooting and making the effort. It will eventually work, once you understand how the thing works a little bit internally.

Phil E.