datagrids that do not display when a stack is reopened
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
datagrids that do not display when a stack is reopened
Hi, I seem to have this problem, where when I reopen my stack after quitting the application,
the items that were supposed to display on my datagrid form do not. The row template and row behaviour button does not work too. I get a blank datagrid.
What shd I do, as this is very irritating...
Regards,
Gautami
the items that were supposed to display on my datagrid form do not. The row template and row behaviour button does not work too. I get a blank datagrid.
What shd I do, as this is very irritating...
Regards,
Gautami
Re: datagrids that do not display when a stack is reopened
Hi.
What happens if, before you close, you
Craig Newman
What happens if, before you close, you
Code: Select all
send "resetList" to grp "yourDG"
Re: datagrids that do not display when a stack is reopened
Hello.
Thank you for your reply, but I am unsure of what exactly you mean by that. Where do I add the code when I am unable to access the row template and behaviour script??
But I did figure out, or at least am suspecting that my problem has to something to do with the huge amount of cards in my datagrid templates. Seems like everytime I open a datagrid and delete it without deleting the record template associated with it, the card remains. Makes sense, but when I want to delete the cards, I do not know which is impt and which are irrelavant.So there is that :/ I believe that perhaps i have too many templates that maybe the datagrid does not know which one to access when I close and open the stack. So i did something potentially stupid that I do not know how to undo.
See, there is stack A and B. I copied a dg from A to B. And as mentioned above, after a while i realised that there were too many cards, and so from both stacks i deleted every card except one, the one that seemed the most correct. And lo and behold, datagrid in both stacks work. But unfortunately it was not the template I wanted for B so I edited the one in B, and now I realise that the dg in A, the original dg does not work. My back up copies all do not work too.
I am confused. I do not understand why this is so. How would I make workable backups of my work if one change stops all the copies to stop working? How do I make the template B from affecting A? And how do I get back the original template? Can I make a custom template? i cant do a copy and paste in the application browser either .. So do i delete all my copies of B to get back A?
i am sorry its a lengthy post, but i thought I would explain some of the context for others who may have similar problems and the process I went through.And I am utterly perplexed too.
Do you have any advice for me??
Thank you.
Gautami
Thank you for your reply, but I am unsure of what exactly you mean by that. Where do I add the code when I am unable to access the row template and behaviour script??
But I did figure out, or at least am suspecting that my problem has to something to do with the huge amount of cards in my datagrid templates. Seems like everytime I open a datagrid and delete it without deleting the record template associated with it, the card remains. Makes sense, but when I want to delete the cards, I do not know which is impt and which are irrelavant.So there is that :/ I believe that perhaps i have too many templates that maybe the datagrid does not know which one to access when I close and open the stack. So i did something potentially stupid that I do not know how to undo.
See, there is stack A and B. I copied a dg from A to B. And as mentioned above, after a while i realised that there were too many cards, and so from both stacks i deleted every card except one, the one that seemed the most correct. And lo and behold, datagrid in both stacks work. But unfortunately it was not the template I wanted for B so I edited the one in B, and now I realise that the dg in A, the original dg does not work. My back up copies all do not work too.
I am confused. I do not understand why this is so. How would I make workable backups of my work if one change stops all the copies to stop working? How do I make the template B from affecting A? And how do I get back the original template? Can I make a custom template? i cant do a copy and paste in the application browser either .. So do i delete all my copies of B to get back A?
i am sorry its a lengthy post, but i thought I would explain some of the context for others who may have similar problems and the process I went through.And I am utterly perplexed too.
Do you have any advice for me??
Thank you.
Gautami
Re: datagrids that do not display when a stack is reopened
Hi.
The command to send that message to the DG group can be made in any way. I thought it might be on closeStack, since your original post mentioned DG's not being saved between sessions or stack re-openings.
When you copy the DG from stack A to stack B, are you creating a new DG on a new card in stack B? If so, why? Would it not be better to simply load the data in the stack a DG into a single target DG in stack B, using either the "dgText" or "dgData"? Do you need more than two DG's overall?
I am sure I am not understanding.
However, I do not think that, speed issues aside, there is any problem with large numbers of cards, templates, or whatever. But perhaps others will have a different opinion.
Craig Newman
The command to send that message to the DG group can be made in any way. I thought it might be on closeStack, since your original post mentioned DG's not being saved between sessions or stack re-openings.
When you copy the DG from stack A to stack B, are you creating a new DG on a new card in stack B? If so, why? Would it not be better to simply load the data in the stack a DG into a single target DG in stack B, using either the "dgText" or "dgData"? Do you need more than two DG's overall?
I am sure I am not understanding.
However, I do not think that, speed issues aside, there is any problem with large numbers of cards, templates, or whatever. But perhaps others will have a different opinion.
Craig Newman
Re: datagrids that do not display when a stack is reopened
Hi.
Sorry, I was not clear.
I had this sample stack from which I wanted to take the dg and put it into my stack and edit the template. I was having trouble because the second dg's template was pointing to the first. So i resolved it by copying out the card in the orig template into my second dg and setting the second dg to this new card. All works fine till i close the stack. Then I get the errors.
I tried doing what you suggested.
send "resetlist" to grp "mydg"
the error I got was
"An error has occurred in behavior for the column template:
Chunk: error in object expression"
and it went to the button "DataGrid" script with the error located at
"set the dgHilite of pControl to pBoolean"
I do not understand this..
Sorry, I was not clear.
I had this sample stack from which I wanted to take the dg and put it into my stack and edit the template. I was having trouble because the second dg's template was pointing to the first. So i resolved it by copying out the card in the orig template into my second dg and setting the second dg to this new card. All works fine till i close the stack. Then I get the errors.
I tried doing what you suggested.
send "resetlist" to grp "mydg"
the error I got was
"An error has occurred in behavior for the column template:
Chunk: error in object expression"
and it went to the button "DataGrid" script with the error located at
"set the dgHilite of pControl to pBoolean"
I do not understand this..
Re: datagrids that do not display when a stack is reopened
There is no native 'dghilite" property. This from the dataGrid manual'
andsetprop dgHilite pBoolean
-- This custom property is set when the highlight of your column template has
-- changed. You only add script here if you want to customize the highlight.
if pBoolean then
set the foregroundcolor of me to the dgProp["hilited text color"] of the dgControl of me
else
SetForeGroundColor
end if
end dgHilite
dgHilite pBoolean (setProp)
- This property is set by the data grid to set the highlighted state of the row or column control. If
pBoolean is "true" then the control should be highlighted. If "false" then it should not be.
Re: datagrids that do not display when a stack is reopened
Yes i am aware of this.
it is in my button behaviour script ...
--------------------------------
setprop dgHilite pBoolean
end dgHilite
--------------------------------
This is where i got the original codes from:
http://www.bluemangolearning.com/downlo ... abases.zip (thank you Trevor!)
Maybe it may help...
So i copies the dg and the template into my stack, removed all the controls in the template except for title. Edited the card script a bit. And changed the sql file it was linked to.
And I keep getting this error once i close the stack and am unable to access the row template.
Sighz...
it is in my button behaviour script ...
--------------------------------
setprop dgHilite pBoolean
end dgHilite
--------------------------------
This is where i got the original codes from:
http://www.bluemangolearning.com/downlo ... abases.zip (thank you Trevor!)
Maybe it may help...
So i copies the dg and the template into my stack, removed all the controls in the template except for title. Edited the card script a bit. And changed the sql file it was linked to.
And I keep getting this error once i close the stack and am unable to access the row template.
Sighz...
Re: datagrids that do not display when a stack is reopened
Hi,
I realised what was the problem. At least I think this is it.
My new template's row behaviour was still referring to the old template stack.
But when I try to change the behaviour directly, it does not work though..
Is there any way I can manually set it ?
I realised what was the problem. At least I think this is it.
My new template's row behaviour was still referring to the old template stack.
But when I try to change the behaviour directly, it does not work though..
Is there any way I can manually set it ?
Re: datagrids that do not display when a stack is reopened
Success!!!!
Sweet Sweet Success!!
Thanks!
G
Sweet Sweet Success!!
Thanks!
G
Re: datagrids that do not display when a stack is reopened
Would you please tell us what you did or what the problem was?
Thanks!
Thanks!
Re: datagrids that do not display when a stack is reopened
oh oops, sorry haha.
So a summary is that,
when a datagrid from a sample stack is copied over to another datagrid, the template cannot be edited on the new stack without affecting the original stack, because they both were using the same template.
Because I did not know this, i was happily editing the datagrid on my stack, clicking more cards as i kept saving the changes to template.
I think because of this, somehow, the row behaviour button could not be accessed as it probably was confused with the large number of cards I had generated.(or something, i am nt very sure)
So what worked was deleting those unnecessary cards. then copying the original template to my stack via the command
-------
copy card id 1005 of stack "Data Grid Templates 1239333429952" to stack "Data Grid Templates 1374086345719"
-------
then i set the datagrid to this template via
--------------
set the dgProps["row template"] of group "Data Grid" to the long id of group id 1121 of card id 1108 of stack "Data Grid Templates 1374086345719"
----------------
still my datagrid was giving me the previously mentioned chunk not found errors.
So i trawled through each object of the template stack in my stack in the application browser, and saw that it had 2 items of importance, called the row template and record template.
I noted that the in the properties pane of the record template was set to button 1027 of template stack "123..." which was the id of the original template, not my new one.
I also was unable to edit that portion manually as everytime i edited and closed the pane and opened it again, the old numbers were back. And I could not unlock to edit and then lock it back either. So i deleted that card, and recopied it from the original. I got the exact same results, except now i could edit the properties pane.
Then i had to figure out the correct button id number too. So after observing other sample stacks, i saw that the button id was the id of the "behaviour script" in the template.
Hence i manually reset the button id of both templates to
----------------
button id 1107 of stack "Data Grid Templates 1374086345719"
----------------
And then i reset the datagid.
-----------------
set the dgProps["row template"] of group "Data Grid" to the long id of group id 1122 of card id 1108 of stack "Data Grid Templates 1374086345719"
-----------------
And voila, my datagrid worked. Not perfectly though.
i have an extra group in that template card that i do not know does what. Each strip in my datagrip is separate from the next, as though it has a white border.
And once i remove my stack from the memory , the original sample stack i obtained the dg from works perfectly. But if i were to open the sample stack after opening mine, it shows the same error as before.
But i am not <yet> too concerned abt it though.
And that concludes 3 days of sleeplessness of my ultra noob self
=D
And it was all done thanks to other threads of this forum! <3 <3
So thank you all!
So..till the next time (which will probably be in the next couple of hrs),
Gautami
So a summary is that,
when a datagrid from a sample stack is copied over to another datagrid, the template cannot be edited on the new stack without affecting the original stack, because they both were using the same template.
Because I did not know this, i was happily editing the datagrid on my stack, clicking more cards as i kept saving the changes to template.
I think because of this, somehow, the row behaviour button could not be accessed as it probably was confused with the large number of cards I had generated.(or something, i am nt very sure)
So what worked was deleting those unnecessary cards. then copying the original template to my stack via the command
-------
copy card id 1005 of stack "Data Grid Templates 1239333429952" to stack "Data Grid Templates 1374086345719"
-------
then i set the datagrid to this template via
--------------
set the dgProps["row template"] of group "Data Grid" to the long id of group id 1121 of card id 1108 of stack "Data Grid Templates 1374086345719"
----------------
still my datagrid was giving me the previously mentioned chunk not found errors.
So i trawled through each object of the template stack in my stack in the application browser, and saw that it had 2 items of importance, called the row template and record template.
I noted that the in the properties pane of the record template was set to button 1027 of template stack "123..." which was the id of the original template, not my new one.
I also was unable to edit that portion manually as everytime i edited and closed the pane and opened it again, the old numbers were back. And I could not unlock to edit and then lock it back either. So i deleted that card, and recopied it from the original. I got the exact same results, except now i could edit the properties pane.
Then i had to figure out the correct button id number too. So after observing other sample stacks, i saw that the button id was the id of the "behaviour script" in the template.
Hence i manually reset the button id of both templates to
----------------
button id 1107 of stack "Data Grid Templates 1374086345719"
----------------
And then i reset the datagid.
-----------------
set the dgProps["row template"] of group "Data Grid" to the long id of group id 1122 of card id 1108 of stack "Data Grid Templates 1374086345719"
-----------------
And voila, my datagrid worked. Not perfectly though.
i have an extra group in that template card that i do not know does what. Each strip in my datagrip is separate from the next, as though it has a white border.
And once i remove my stack from the memory , the original sample stack i obtained the dg from works perfectly. But if i were to open the sample stack after opening mine, it shows the same error as before.
But i am not <yet> too concerned abt it though.
And that concludes 3 days of sleeplessness of my ultra noob self
=D
And it was all done thanks to other threads of this forum! <3 <3
So thank you all!
So..till the next time (which will probably be in the next couple of hrs),
Gautami