Row Template Column Behavior
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Row Template Column Behavior
Good day,
I have created a column in my datagrid which I use to click buttons for editing records, deleting records, etc. I have everything working nicely except the buttons only show on the second line for 12 lines, skips a line of buttons and then shows another 12 lines and so on all the way to the end of the records. See attached screenshot.
Any idea would be helpful thank you.
I have created a column in my datagrid which I use to click buttons for editing records, deleting records, etc. I have everything working nicely except the buttons only show on the second line for 12 lines, skips a line of buttons and then shows another 12 lines and so on all the way to the end of the records. See attached screenshot.
Any idea would be helpful thank you.
- Attachments
-
- Screen Shot 2014-03-24 at 11.09.38 AM.png (33.33 KiB) Viewed 4938 times
Re: Row Template Column Behavior
Hi Nico,
please show us your script(s), especially the "fillInData" handler.
Best
Klaus
please show us your script(s), especially the "fillInData" handler.
Best
Klaus
Re: Row Template Column Behavior
Hi Klaus,
There is no script in fillInData section. pData variable is blank. I have created the buttons in the row template and placed my scripts in the buttons. What else can I send you that may shed some light?
Best
Nic
There is no script in fillInData section. pData variable is blank. I have created the buttons in the row template and placed my scripts in the buttons. What else can I send you that may shed some light?
Best
Nic
Re: Row Template Column Behavior
Hi Nic,
aha, OK, so you have a datagrid of type TABLE and you added some buttons to the row template***.
Then you "set the dgtext of grp xyz" to a tab delimited list, is that correct so far?
*** I am not sure if this is supported at all in a DG of type TABLE.
Best
Klaus
aha, OK, so you have a datagrid of type TABLE and you added some buttons to the row template***.
Then you "set the dgtext of grp xyz" to a tab delimited list, is that correct so far?
*** I am not sure if this is supported at all in a DG of type TABLE.
Best
Klaus
Re: Row Template Column Behavior
Hi Klaus,
Yes this is correct, I was also under the impression that buttons would not work in a table grid but all the buttons work as expected. Each button has it's own script as such:
When the salesStack opens, gArray is passed and everything works as expected. Just a bit bizarre that it would skip the first and every 12 lines.
Yes this is correct, I was also under the impression that buttons would not work in a table grid but all the buttons work as expected. Each button has it's own script as such:
Code: Select all
global gArray
on mouseUp
get the dgHilitedIndex of control "salesGrid"
put the dgDataOfIndex[it]of control "salesGrid" into gArray
open stack "salesStack"
end mouseUp
Re: Row Template Column Behavior
Hm, no idea what's going on there!?
So no 13th line, maybe LC is superstitious?
Hint: "control X" is valid syntax, but directly using the correct object type is even faster:
...
set the dgtext of GRP "salesGrid" ...
...
So no 13th line, maybe LC is superstitious?

Hint: "control X" is valid syntax, but directly using the correct object type is even faster:
...
set the dgtext of GRP "salesGrid" ...
...
Re: Row Template Column Behavior
Actually, it's no first line and then a break every twelve lines.. Livecode appears to be very superstitious!
Could it be that the grid is populated with data prior to the buttons being rendered? That still wouldn't explain why it would skip records.
Could it be that the grid is populated with data prior to the buttons being rendered? That still wouldn't explain why it would skip records.