Click here to Skip to main content
15,886,258 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
i want to align two gridviews horizontally


VB
pdfTable = New PdfPTable(1)
          Phrase = New Phrase()
          pdfTable.DefaultCell.Padding = 5
          pdfTable.WidthPercentage = 50
          pdfTable.HorizontalAlignment = Element.ALIGN_RIGHT
          pdfTable.DefaultCell.BorderWidth = 1
          pdfTable.SpacingBefore = 15.0F
          cell = New PdfPCell(New Phrase("For Post office use only"))
          cell.BackgroundColor = New iTextSharp.text.Color(240, 240, 240)
          cell.Padding = 5
          pdfTable.AddCell(cell)
          For x As Integer = 1 To 5
              cell = New PdfPCell(New Phrase(""))
          Next
          pdfDoc.Add(pdfTable)
          pdfTable = New PdfPTable(2)
          Phrase = New Phrase()
          pdfTable.DefaultCell.Padding = 3
          pdfTable.WidthPercentage = 20
          pdfTable.HorizontalAlignment = Element.ALIGN_Left

          pdfTable.DefaultCell.BorderWidth = 1
          pdfTable.SpacingBefore = 15.0F
          Dim _Contact As New ArrayList
          _Contact.Add("Date of Posting")
          _Contact.Add("Company Name")
          _Contact.Add("Customer Name")
          _Contact.Add("Telephone Name")
          _Contact.Add("Customer Signature")
          For x As Integer = 0 To _Header.Count - 1
              pdfTable.AddCell(_Contact(x).ToString)
              pdfTable.AddCell("")
          Next
          pdfDoc.Add(pdfTable)
Posted
Updated 28-Aug-14 23:42pm
v3
Comments
OriginalGriff 29-Aug-14 6:49am    
Please stop reposting the same question: it isn't going to improve your chances of an answer.
It does annoy, and it does get the reposts deleted...
Sergey Alexandrovich Kryukov 29-Aug-14 9:28am    
Not a question.
—SA

1 solution

The attempt to align two grid views indicates a questionable or bad UI and code design. But if you really need some content which you put in two grid view horizontally aligned, you apparently try to put two grid views side by side? Not think: how the whole view would be different from just one grid view? So, the solution can be using on common grid view for both piece of content.

—SA
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900