How to apply Row and Column Templates to Datgagrid
Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller
Re: How to apply Row and Column Templates to Datgagrid
Nope. You mentioned a card. A "namely" card. I did some web work. Can't find that. What "card" holds the fields such that they show up in the datagrid.
Re: How to apply Row and Column Templates to Datgagrid
Come on, now you're making fun of me!bbhank wrote:Nope. You mentioned a card. A "namely" card. I did some web work. Can't find that.
Hey I am not a native english speaker but nevertheless know the term "namely", which may be
seldom used but it is just an adjective and not special KIND of card or whatever you migh have thought.
Sigh...bbhank wrote:What "card" holds the fields such that they show up in the datagrid.
The card we were talking about for hours -> the card that you posted a screenshot of.
The card you added objects to (insted to the group "Row template" on that namely (sic!) card).
The card that opens after you click "Row template..." in the inspector for your datagrid.
The card with the actual "Row template" group in the stack "Data Grid Templates XXXXXX".
Re: How to apply Row and Column Templates to Datgagrid
The one that doesn't put the items into the datagrid!!
Re: How to apply Row and Column Templates to Datgagrid
Cards usually don't do anything by themselves, unless you tell them...
Re: How to apply Row and Column Templates to Datgagrid
Think about it! If it worked as either you or the information I have so far, says, we wouldn't be here!!
I've been through the suggested materials and much more looking, and if the answer was readily available there would have been no need to ask here.
I've been through the suggested materials and much more looking, and if the answer was readily available there would have been no need to ask here.
Re: How to apply Row and Column Templates to Datgagrid
Where do you put the items drug onto the template so that they will show up in the grid is the issue? How do you get them to show up? Where are the steps for that, if there's some tutorial or whatever?
Re: How to apply Row and Column Templates to Datgagrid
I think you are not reading the instructions or Klaus's comments carefully.bbhank wrote:Where do you put the items drug onto the template so that they will show up in the grid is the issue? How do you get them to show up?
It is also a good idea to use the LiveCode terminology to avoid further confusion.
For example,
There are two controls, not fields; one of them is a field, the other (backGround) is a graphic.bbhank wrote:Yes. Over and over. How can you not?
There appear to be two fields here. Label and Background.
The quote referenced by Klaus says " .... select the "Row Template" group and choose Object > Edit Group menu item"Klaus wrote:You did read the little text at the bottom of that card, not?
Here, we have nested groups; you have to edit the correct group.
When you open the row template editor, it reveals a card containing the "Row Template" group.
The little instruction says that you have to open up that group to allow its contents to be edited.
If you don't do that, you will be adding your controls beside the "Row Template" group, not inside it. These won't show up!
I am not sure, but from the image you have attached to an earlier message, it appears that you have added the controls without opening the "Row Template" group for editing.
If you have done it correctly, the added controls should appear nested within the Row Template group (as shown in the Tutorial that we have been referring to): Regards,
Sri
Re: How to apply Row and Column Templates to Datgagrid
Check this out:
None of these fields, buttons, anything else, show up anywhere but on the template.
That's been the problem all the time. I've followed the instructions many times, many variations, even, without success.
That's why I say, YES, I'm missing something. It's probably small but missed and keeps me from moving forward. This is harder than working with the datagrid after. I understand a lot about it, just have problem getting this part.
.None of these fields, buttons, anything else, show up anywhere but on the template.
That's been the problem all the time. I've followed the instructions many times, many variations, even, without success.
That's why I say, YES, I'm missing something. It's probably small but missed and keeps me from moving forward. This is harder than working with the datagrid after. I understand a lot about it, just have problem getting this part.
Re: How to apply Row and Column Templates to Datgagrid
C'mon, now. I gotta get mine too. It works both ways.Come on, now you're making fun of me!
-
- VIP Livecode Opensource Backer
- Posts: 7229
- Joined: Sat Apr 08, 2006 8:31 pm
- Location: Minneapolis MN
- Contact:
Re: How to apply Row and Column Templates to Datgagrid
@bbhank, are you familiar with how groups work? To create an object inside a group, you need to first select that group and then turn on group editing. The card appearance will change, only the objects in the group will show. Create your objects in that view, then stop editing. The steps are:
Select the group. You can do that three ways:
1. Make sure the "Select Grouped" icon in the toolbar is NOT bold and then click on any object in the group.
2. Select the group in the application browser
3. Select the group in the Project Browser
When the group is selected, go into edit mode. You can do that two ways:
1. Choose "Edit group" from the Objects menu
2. Click the "Edit group" icon in the toolbar
When the card view changes and only shows the objects inside the group, you are in edit mode. The window title will also say "(background 'group id xxxx')'" as verification. Drag objects and arrange your layout. When you are done, leave edit mode. You can do that in either of the two ways you used to start editing. The card appearance will return to normal and the window title will revert to just the name of the stack.
This is basic LC behavior, unrelated to datagrids, and applies to all groups in any stack. The User Guide explains more about editing groups on page 109.
Select the group. You can do that three ways:
1. Make sure the "Select Grouped" icon in the toolbar is NOT bold and then click on any object in the group.
2. Select the group in the application browser
3. Select the group in the Project Browser
When the group is selected, go into edit mode. You can do that two ways:
1. Choose "Edit group" from the Objects menu
2. Click the "Edit group" icon in the toolbar
When the card view changes and only shows the objects inside the group, you are in edit mode. The window title will also say "(background 'group id xxxx')'" as verification. Drag objects and arrange your layout. When you are done, leave edit mode. You can do that in either of the two ways you used to start editing. The card appearance will return to normal and the window title will revert to just the name of the stack.
This is basic LC behavior, unrelated to datagrids, and applies to all groups in any stack. The User Guide explains more about editing groups on page 109.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
HyperActive Software | http://www.hyperactivesw.com
Re: How to apply Row and Column Templates to Datgagrid
If you edit the group containing the objects desired on the datagrid form, so that any new objects you create to use on the form are definitely within the group, they should show up. If you add a field, change its properties to have a solid border, for instance. Change the size of the background graphic.
Save the row template.
In the datagrid property inspector make sure the fixed row height is turned off.
Back in the row template fill in data handler you will need to add extra lines to populate the data from each element of the array to your extra controls.
The layoutControl handler can be used to resize and align the controls on your DG form, for instance if you want to shrink/expand each row according to how much data needs to be displayed.
If you are still having trouble, tomorrow I will try to make a demo that you can pick apart.
Save the row template.
In the datagrid property inspector make sure the fixed row height is turned off.
Back in the row template fill in data handler you will need to add extra lines to populate the data from each element of the array to your extra controls.
The layoutControl handler can be used to resize and align the controls on your DG form, for instance if you want to shrink/expand each row according to how much data needs to be displayed.
If you are still having trouble, tomorrow I will try to make a demo that you can pick apart.
Re: How to apply Row and Column Templates to Datgagrid
Oh thank you. It finally worked in a blank new document. I still don't see what I did though. That's why I keep saying I'm the one who is missing something. You're helping me get on track. This is the needed stuff. I'm gone also but my email gets alerts whenever someone posts to this group.
Thank you. Thank you.
I'll be going back through your instructions til I get it "right", whatever that is . I know they work, just if I can do it.
Thank you. Thank you.
I'll be going back through your instructions til I get it "right", whatever that is . I know they work, just if I can do it.
Re: How to apply Row and Column Templates to Datgagrid
Hi all,
I made a video explaining the datagrid customization procedure, here is the link: https://youtu.be/VNSHLOjE6r8
Now it should be clear for all.
I made a video explaining the datagrid customization procedure, here is the link: https://youtu.be/VNSHLOjE6r8
Now it should be clear for all.
Livecode Wiki: http://livecode.wikia.com
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
My blog: https://livecode-blogger.blogspot.com
To post code use this: http://tinyurl.com/ogp6d5w
Re: How to apply Row and Column Templates to Datgagrid
Thank you for all the work.
Your instructions were spot on all the time. I found something weird about my system. I kept starting over and starting over, building stacks from scratch, tryin to get it to work step by step from the instructions, yours, Klaus, the lessons n tutorials. I had started another stack that had data in the grid itself that showed up as a table. When I switched to a form, the fields that had been drug into the template appeared. So I went back and started yet another fresh stack. Same thing UNTIL I put one character in the datagrid itself. As soon as I hit return or left the field, any controls, objects, that were in the datagrid showed up. So I put just a space in the actual datagrid, and now everything works as I have been asking for. I don't know what having a character in the actual datagrid does but it now works, and works quite swell. The drag n drop features are actually there. I have an AMD processor and that does cause some differences. This might have caused the issue. I don't know but now with the space it works, and without it does not.
The other important thing needed was unlock the row height, duhhh. This isn't related to the problem though, just something that if forgotten can make one think the fields didn't appear. They do unless there is a weird problem like this space issue, just off the row where you can't see em, unless you uncheck the box that freezes the row height.
Ever heard of this space issue though?
Thank you.
Your instructions were spot on all the time. I found something weird about my system. I kept starting over and starting over, building stacks from scratch, tryin to get it to work step by step from the instructions, yours, Klaus, the lessons n tutorials. I had started another stack that had data in the grid itself that showed up as a table. When I switched to a form, the fields that had been drug into the template appeared. So I went back and started yet another fresh stack. Same thing UNTIL I put one character in the datagrid itself. As soon as I hit return or left the field, any controls, objects, that were in the datagrid showed up. So I put just a space in the actual datagrid, and now everything works as I have been asking for. I don't know what having a character in the actual datagrid does but it now works, and works quite swell. The drag n drop features are actually there. I have an AMD processor and that does cause some differences. This might have caused the issue. I don't know but now with the space it works, and without it does not.
The other important thing needed was unlock the row height, duhhh. This isn't related to the problem though, just something that if forgotten can make one think the fields didn't appear. They do unless there is a weird problem like this space issue, just off the row where you can't see em, unless you uncheck the box that freezes the row height.
Ever heard of this space issue though?
Thank you.
Re: How to apply Row and Column Templates to Datgagrid
Ok. I know the stack ain't pretty. Workabilly first, then MAYBE some looks.