Page 1 of 1

Help with customising data grid columns

Posted: Sat Aug 08, 2009 11:23 pm
by phaworth
I've really liked working with some simple table data grids and now ready to move on to customising them.

I have a table with three columns and got through the instructions in the manual (thank you Trevor!) for editing the row template then the column template and successfully placed the option menus on the column template, then closed the the column template editing window.

In the application browser, I can see the controls I placed in the row template just as shown in the manual, but in the table on my card everything still just shows up as plain text, not as option menus.

I also see the buttons that contain the behaviour scripts, but I haven't yet progressed to editing those scripts.

Help!

Pete

Posted: Sun Aug 09, 2009 3:34 am
by trevordevore
Hi Pete,

Did you click the "Refresh Data Grid" button in the property inspector after making the changes? The data grid will need to be redrawn in order for the changes you made to show up.

Posted: Sun Aug 09, 2009 4:39 am
by phaworth
Just tried that and didn't make any difference. Also tried quitting Rev and re-running - still no change.

I'm wondering if I should just start over but I don't know how to get rid of the row/column templates I created?

Also, this is a table data grid, not a form - I can still customise a table this way, right?

Posted: Sun Aug 09, 2009 5:35 am
by trevordevore
Yes, you can customize a table's columns but the method is slightly different for a table than it is for a column. As long as you are following the directions in this lesson it should work:

How Do I Customize A Table's Columns?

The key is to make sure your Row Template group has a control (most likely a group) in it named after the column in your data grid. If you are using the Property Inspector to create the column template then a group with the column name should be created.

What could break things? If you rename your columns after creating the custom template then there would no longer be a group in the Row Template named after the column.

Posted: Thu Aug 13, 2009 7:24 am
by phaworth
Hi Trevor,
I'm afraid I'm just having any success with customising my columns. I started from scratch on a new card, opened the row template then the column template, then dragged an option menu button into one of the columns. Saved everything, clicked Refresh Row Template, no option menu shows up. Go back to the row/column template and I see the option menu there.

I'm obviously doing something wrong but I'm out of ideas.

Pete

Posted: Thu Aug 13, 2009 2:44 pm
by trevordevore
Pete,

Can you post a screenshot somewhere of what the application browser looks like when viewing the card with your customized templates?

Posted: Thu Aug 13, 2009 6:20 pm
by phaworth
Hi Trevor,
I have screen shots of the card and the application browser window but I've never posted an image to the forum before. I see there's an img tag but I don;t seem to be able to paste the images in there. How do I include them in a post, or is it even possible?

Pete

Posted: Thu Aug 13, 2009 6:24 pm
by trevordevore
You can't upload an image to a post but you can upload an image to a server and then embed the image using BBCode:

http://forums.runrev.com/phpBB2/faq.php?mode=bbcode#9

Posted: Thu Aug 13, 2009 7:02 pm
by phaworth
OK, I
'll upload the imsges and make a ost when they're done.

Just to be sure I know exacty what you want, which card is it you want me to open in the Application browser - the card I placed the datagrid on or the card in the Data Grid Templates stack that relates to the data grid?

Thanks,
Pete

Posted: Thu Aug 13, 2009 7:14 pm
by phaworth
Here's the images.

First is a show of the card with the datagrid control on it:

[img]
http://www.mollysrevenge.com/images/picture2.png
[/img]

Next, here's a shot of the coulmn group editing card showing the option button in place:

[img]
http://www.mollysrevenge.com/images/picture3.png
[/img]

The next one shows my card in the Application browser:

[img]
http://www.mollysrevenge.com/images/picture4.png
[/img]

Finally, here's a shot of the card in the Data Grid Templates stack that relates to the datagrid on my card (I think!):

[img]
http://www.mollysrevenge.com/images/picture1.png
[/img]

I can already see that the Application Browser shots don't look anything like the screen shots in the Data Grid manual section on customising columns.

Thanks for your help Trevor.

Pete

Also, I'm working on a Mac, OSX 10.5.7

Posted: Fri Aug 14, 2009 5:55 am
by trevordevore
Can you take http://www.mollysrevenge.com/images/picture1.png again but sort the Application Browser by Layer? Just click on the Layer column header. Doing so will show the hierarchy of controls by indenting controls that are in a group.

Posted: Fri Aug 14, 2009 6:44 am
by phaworth
Sure, here it is:

Image

Posted: Fri Aug 14, 2009 1:28 pm
by trevordevore
Seeing as you have a column named "Col 2" in your data grid and assuming the dgProps["row template"] property of your data grid points to the Row Template group of card id 1105 of your data grid stack I would think that you would see something. Does your "Col 2 Behavior" script do anything in regards to resizing or positioning that might hide the button?

You can email me the stack and I can take a look. Just send it to lists at mangomultimedia dot com.

Posted: Fri Aug 14, 2009 4:18 pm
by phaworth
Thanks a lot Trevor. the dgprops["row template"] resolves to:

group id 1106 of card id 1105 of stack "Data Grid Templates 1248126213186"

I'll send you my stack, thanks for offering that.

Pete