Solved

asp flow layout?

Posted on 2016-08-14
4
32 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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

How Do You Stack Up Against Your Peers?

With today’s modern enterprise so dependent on digital infrastructures, the impact of major incidents has increased dramatically. Grab the report now to gain insight into how your organization ranks against your peers and learn best-in-class strategies to resolve incidents.

Question has a verified solution.

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

Today I had a very interesting conundrum that had to get solved quickly. Needless to say, it wasn't resolved quickly because when we needed it we were very rushed, but as soon as the conference call was over and I took a step back I saw the correct …
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Monitoring a network: how to monitor network services and why? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the philosophy behind service monitoring and why a handshake validation is critical in network monitoring. Software utilized …
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

729 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