Solved

asp flow layout?

Posted on 2016-08-14
4
18 Views
Last Modified: 2016-10-10
dear all
i need an html table where i need to add 6 column maximum in example and then data will be dsiplayed row by row wich means if a data contains 18 values and i need to display them in  atable

i need a table that can maximum fill 6 columns
so in my example i will have 3 rows and in every row i have 6columns hoiw to do that
0
Comment
Question by:pamela rizk
  • 2
4 Comments
 

Author Comment

by:pamela rizk
ID: 41755379
any news?
0
 
LVL 12

Expert Comment

by:funwithdotnet
ID: 41755609
HTML tables are fixed by nature, however you can re-define them based on the number of cell data elements you want to populate.

For this example, Iassume all the data is in an array (I like ArrayLists):

myData(17) ' contains 18 data elements

dim output as string = ""
dim rowCellCount as integer = 1 ' initialize to first cell of row
Dim cellsPerRow as integer = 6

For x as integer = 0 to myData.Length -1

If x = 0 ' Build opening table tag & first row tag ...
   output &= "<table>" & vbCrLf
End If

If rowCellCount = 1 Then ' start a row
   output &= "<tr>" & vbCrLf
End If

' add cell with data
output &= "<td>" & myData(x) " </td>"

if rowCellCount = cellsPerRow Then
   ' finish the row ...
   output &= vbCrLf
   output &= "</tr>" & vbCrLf
   rowCellCount =1
Else
   rowCellCount += 1
End If

Next
' table has been populated. End the table
output &= "</table>"

Open in new window


There are a multitude of techniques to use if the data doesn't fully populate the table structure.

Good luck!
0
 

Accepted Solution

by:
pamela rizk earned 0 total points
ID: 41766362
thank you i solved my issye using division with style ="display:inline block"
this solve my problem
0

Featured Post

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

More often than not, we developers are confronted with a need: a need to make some kind of magic happen via code. Whether it is for a client, for the boss, or for our own personal projects, the need must be satisfied. Most of the time, the Framework…
It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question