Solved

asp flow layout?

Posted on 2016-08-14
4
9 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
Comment Utility
any news?
0
 
LVL 12

Expert Comment

by:funwithdotnet
Comment Utility
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
Comment Utility
thank you i solved my issye using division with style ="display:inline block"
this solve my problem
0

Featured Post

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

A quick way to get a menu to work on our website, is using the Menu control and assign it to a web.sitemap using SiteMapDataSource. Example of web.sitemap file: (CODE) Sample code to add to the page menu: (CODE) Running the application, we wi…
Problem Hi all,    While many today have fast Internet connection, there are many still who do not, or are connecting through devices with a slower connect, so light web pages and fast load times are still popular.    If your ASP.NET page …
This video discusses moving either the default database or any database to a new volume.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…

763 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

Need Help in Real-Time?

Connect with top rated Experts

14 Experts available now in Live!

Get 1:1 Help Now