I've three questions after a project with data grids. Could anyone enlighten me? (Win7, LC6.5.1)
1) Somewhere during programming several data grid tables and forms, the property inspector's "Row Template" button starts going to the most recent substack card, not the appropriate card for the dg. I must navigate to the appropriate card. The "Row Behavior" button always works properly. The data grid works properly. I can't reproduce this in a clean stack. Where did I go wrong? Can the "Row Template" button be coaxed to go to the appropriate substack card?
2) The first data grid dragged from the tools palette to a stack creates the dg substack with TWO cards, the second card has the row template group and behavior script for the dg, but the first card, always id 1002, has no row template group or behavior script. What is the purpose of the first card?
3) When deleting the last dg in a stack, the warning dialog's "Yes" option (to delete dg and its substack cd) doesn't delete anything. The "No" option (to delete dg but leave its substack cd) deletes the dg, its cd, and the substack. I would have expected this action from the "Yes" button, or better still no dialog at all since it's the last dg and everything should be deleted anyway. Am I mis-interpreting the dialog?
Data Grid Row Template Button Problem
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller
Data Grid Row Template Button Problem
Beginner Lab (LiveCode tutorial) and StarterKit (my public stacks)
https://tlittle72.neocities.org/openxtalk.html
https://tlittle72.neocities.org/openxtalk.html
Re: Data Grid Row Template Button Problem
I found the solution to question #1, the confused "Row Template" button. I struggled with this for weeks, and finally realized I had a preOpenStack handler in the mainstack's stack script that was trapping the substack when it opened up, executing commands meant for the mainstack. I fixed the problem with: if the owner of this stack = empty then.... Pesky substacks!
on preOpenStack
if the owner of this stack = empty then --mainstack
--do mainstack commands
end if
pass preOpenStack --let substack pass through
end preOpenStack
But what about #2 & #3 questions?
on preOpenStack
if the owner of this stack = empty then --mainstack
--do mainstack commands
end if
pass preOpenStack --let substack pass through
end preOpenStack
But what about #2 & #3 questions?
Beginner Lab (LiveCode tutorial) and StarterKit (my public stacks)
https://tlittle72.neocities.org/openxtalk.html
https://tlittle72.neocities.org/openxtalk.html
Re: Data Grid Row Template Button Problem
Hi Terry,
pesky substacks, aha!
Clicking NO only deleted the dg from the card!
So everything worked as exspected!?
Best
Klaus
pesky substacks, aha!

I have no idea and I really don't care!2.What is the purpose of the first card?

Just made a quick test and clicking YES deleted the dg and the substack and everything related to the dg!3. Delete dg stuff YES NO
Clicking NO only deleted the dg from the card!
So everything worked as exspected!?
Best
Klaus
Re: Data Grid Row Template Button Problem
Thanks Klaus for your reply. I can't explain it. I re-tested the dg delete dialog again with two data grids in a clean stack and everything worked as expected using the "Yes" button to delete dg + associated card + substack...never mind. (Win7, LC6.5.2) Terry
Beginner Lab (LiveCode tutorial) and StarterKit (my public stacks)
https://tlittle72.neocities.org/openxtalk.html
https://tlittle72.neocities.org/openxtalk.html
Re: Data Grid Row Template Button Problem
One word: GREMLINS! 
