![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | Variable Height cells in a table Hi all Is it possible to add variable height cells to a table at run time. Any assistance offered will be most gratefully received Many thanks in advance Iain Definition -------------- <asp:Table id="myTable" runat="server"> </asp:Table></p> Code ------- public void btnCreate_Click(object sender, System.EventArgs e) { myTable.BorderColor = System.Drawing.Color.White; TableRow tRow = new TableRow(); for (int j=1; j<= 3; j++) { TableCell tCell = new TableCell(); tCell.Width = Unit.Pixel(10); tCell.BorderWidth = 0; tCell.Text = "Cell " + j.ToString(); if (j == 1) { tCell.BackColor = System.Drawing.Color.Red; tCell.ForeColor = System.Drawing.Color.Blue; tCell.Height = Unit.Pixel(100); } if (j == 2) { tCell.BackColor = System.Drawing.Color.Blue; tCell.ForeColor = System.Drawing.Color.White; tCell.Height = Unit.Pixel(50); } if (j == 3) { tCell.BackColor = System.Drawing.Color.Red; tCell.ForeColor = System.Drawing.Color.Blue; tCell.Height = Unit.Pixel(750); } tRow.Cells.Add(tCell); } myTable.Rows.Add(tRow); } |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
| Typed datasets and table table adapters components not showing inToolbox | .NET General | |||
| how do you create a dynamic table/pivot table | .NET General | |||
| a little problem with .Range(.Cells(2,1),.Cells(2,49)). | VB Script | |||
| Re: Brain Cells - Just FYI | Vista General | |||
| Variable as hash table issue | PowerShell | |||