![]() |
Varying number of Rows and Colums
1 Attachment(s)
I've got a project that the customer is wanting a table like layout. I've never have used Fusion Pro Tables so this will be a learning curve.
The issue is the amount of cells varies depending on the amount of info. In this example 10 cells Max. ( 2 Columns 5 rows ). I don't see an issue if they are suppling 10 names. The issue is they are wanting to go to a single Column if their is less then 6 names. If their is more then 5 Names and an odd number of names they want the last Name to merge into a single Column. Providing 3 screen shots of different options. Is this even Possible? If so any help getting this done would be extremely helpful. Thanks Devin |
Re: Varying number of Rows and Colums
So is it just that a table gets resized to be narrower when there are fewer than six names, or does the whole output page get resized as well? Either is possible, but there are different approaches for those two requirements.
|
Re: Varying number of Rows and Colums
Glad to here that it's possible.. I did not want to deep dive into to much info from the start if was not going to work.
So the Table needs to fit with in a certain size window. When it goes to a single column the width can stay the same.. I was thinking just merge them would work just fine. |
Re: Varying number of Rows and Colums
Dan,
Just checking in and see if you have any ideas. I'm still trying to read over how to make tables and come close to what were needing. Thanks |
Re: Varying number of Rows and Colums
This is a pretty abstract question. There are a couple of table examples in the Frodo tutorial. You can control the number of rows and columns with a rule. If you can show what you have tried so far, or at least the data, then I, or someone else, might be able to make more specific suggestions.
|
Re: Varying number of Rows and Colums
1 Attachment(s)
Whats the Frodo tutorial?
Right now I've been able to write a simple table like this example below. I still need to figure many things things like how do I even get other fields added to a cell? But the bigger issue is how do I make this dynamic based on the fields used. I've uploaded a sample data set that I made to for testing. Code:
var myTable = new FPTable; |
Re: Varying number of Rows and Colums
So I figured out 2 ways I can place multiple fields in to my Cells.
First would be calling multiple Fileds as part as the Table Rule Code:
myTable.Rows[0].Cells[0].Content = Field("Name1") + '<br>' + Field("Location1") + '<br>' + Field("Phone1"); Code:
return [ Code:
myTable.Rows[0].Cells[1].Content = Rule("Cell1"); |
Re: Varying number of Rows and Colums
Quote:
Quote:
Quote:
Code:
var maxNames = 10; |
Re: Varying number of Rows and Colums
Dan,
Thanks so much! This is just about their in what they are wanting. The only issue that I'm seeing right now it's not centering the table in the text box when it's a single column. |
Re: Varying number of Rows and Colums
Dan,
Looking over what you came up with and If I understand it correctly This code is deremiitng how many columns. Code:
var numColumns = (names.length < 6) ? 1 : 2; Code:
for (var c = 1; c <= numColumns; c++) |
All times are GMT -7. The time now is 09:32 AM. |
Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2022, Jelsoft Enterprises Ltd.
(c) 2011, PTI Marketing Technologies™, Inc.