本文整理汇总了VB.NET中System.Web.UI.WebControls.TableCellCollection.AddRange方法的典型用法代码示例。如果您正苦于以下问题:VB.NET TableCellCollection.AddRange方法的具体用法?VB.NET TableCellCollection.AddRange怎么用?VB.NET TableCellCollection.AddRange使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。
在下文中一共展示了TableCellCollection.AddRange方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的VB.NET代码示例。
示例1: Page_Load
Sub Page_Load(ByVal sender As Object, _
ByVal e As EventArgs)
Dim numRows As Integer = 3
Dim numCells As Integer = 2
' Create 3 rows, each containing 2 cells.
Dim rowNum As Integer
For rowNum = 0 To numRows - 1
Dim arrayOfTableRowCells(numCells - 1) As TableCell
Dim rw As New TableRow()
Dim cellNum As Integer
For cellNum = 0 To numCells - 1
Dim cel As New TableCell()
cel.Text = _
String.Format("[Row {0}, Cell {1}]", rowNum, cellNum)
arrayOfTableRowCells(cellNum) = cel
Next
' Get 'TableCellCollection' associated with the 'TableRow'.
Dim myTableCellCol As TableCellCollection = rw.Cells
' Add a row of cells.
myTableCellCol.AddRange(arrayOfTableRowCells)
Table1.Rows.Add(rw)
Next
End Sub