Solved

asp flow layout?

Posted on 2016-08-14
4
26 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

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

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…
International Data Corporation (IDC) prognosticates that before the current the year gets over disbursing on IT framework products to be sent in cloud environs will be $37.1B.
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

732 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