Share via


TableRow controle de servidor Web Declarative sintaxe

Representa uma linha no Table controle e permite que você manipulá-lo por meio de programação.

<asp:TableRow
    AccessKey="string"
    BackColor="color name|#dddddd"
    BorderColor="color name|#dddddd"
    BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|Groove|Ridge|
        Inset|Outset"
    BorderWidth="size"
    CssClass="string"
    Enabled="True|False"
    EnableTheming="True|False"
    EnableViewState="True|False"
    Font-Bold="True|False"
    Font-Italic="True|False"
    Font-Names="string"
    Font-Overline="True|False"
    Font-Size="string|Smaller|Larger|XX-Small|X-Small|Small|Medium|
        Large|X-Large|XX-Large"
    Font-Strikeout="True|False"
    Font-Underline="True|False"
    ForeColor="color name|#dddddd"
    Height="size"
    HorizontalAlign="NotSet|Left|Center|Right|Justify"
    ID="string"
    OnDataBinding="DataBinding event handler"
    OnDisposed="Disposed event handler"
    OnInit="Init event handler"
    OnLoad="Load event handler"
    OnPreRender="PreRender event handler"
    OnUnload="Unload event handler"
    runat="server"
    SkinID="string"
    Style="string"
    TabIndex="integer"
    TableSection="TableHeader|TableBody|TableFooter"
    ToolTip="string"
    VerticalAlign="NotSet|Top|Middle|Bottom"
    Visible="True|False"
    Width="size"
>
        <asp:TableCell
            AccessKey="string"
            AssociatedHeaderCellID="string"
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
                Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            ColumnSpan="integer"
            CssClass="string"
            Enabled="True|False"
            EnableTheming="True|False"
            EnableViewState="True|False"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|
                X-Small|Small|Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalAlign="NotSet|Left|Center|Right|Justify"
            ID="string"
            OnDataBinding="DataBinding event handler"
            OnDisposed="Disposed event handler"
            OnInit="Init event handler"
            OnLoad="Load event handler"
            OnPreRender="PreRender event handler"
            OnUnload="Unload event handler"
            RowSpan="integer"
            runat="server"
            SkinID="string"
            Style="string"
            TabIndex="integer"
            Text="string"
            ToolTip="string"
            VerticalAlign="NotSet|Top|Middle|Bottom"
            Visible="True|False"
            Width="size"
            Wrap="True|False"
        />
        <asp:TableHeaderCell
            AbbreviatedText="string"
            AccessKey="string"
            AssociatedHeaderCellID="string"
            BackColor="color name|#dddddd"
            BorderColor="color name|#dddddd"
            BorderStyle="NotSet|None|Dotted|Dashed|Solid|Double|
                Groove|Ridge|Inset|Outset"
            BorderWidth="size"
            CategoryText="string"
            ColumnSpan="integer"
            CssClass="string"
            Enabled="True|False"
            EnableTheming="True|False"
            EnableViewState="True|False"
            Font-Bold="True|False"
            Font-Italic="True|False"
            Font-Names="string"
            Font-Overline="True|False"
            Font-Size="string|Smaller|Larger|XX-Small|
                X-Small|Small|Medium|Large|X-Large|XX-Large"
            Font-Strikeout="True|False"
            Font-Underline="True|False"
            ForeColor="color name|#dddddd"
            Height="size"
            HorizontalAlign="NotSet|Left|Center|Right|Justify"
            ID="string"
            OnDataBinding="DataBinding event handler"
            OnDisposed="Disposed event handler"
            OnInit="Init event handler"
            OnLoad="Load event handler"
            OnPreRender="PreRender event handler"
            OnUnload="Unload event handler"
            RowSpan="integer"
            runat="server"
            Scope="NotSet|Row|Column"
            SkinID="string"
            Style="string"
            TabIndex="integer"
            Text="string"
            ToolTip="string"
            VerticalAlign="NotSet|Top|Middle|Bottom"
            Visible="True|False"
            Width="size"
            Wrap="True|False"
        />
</asp:TableRow>

Comentários

Uma instância do TableRow classe representa uma linha em um Table controle. Linhas de uma tabela são armazenadas na Rows coleção da Table controle.

Essa classe permite controlar como o Sumário da linha é exibido. Configurando o HorizontalAlign e VerticalAlign propriedades especificam os alinhamentos horizontais e verticais do Sumário na linha, respectivamente.

As células de uma linha (representadas por instâncias do TableCell classe) são armazenados na Cells coleção da TableRow que representa a linha. Você pode gerenciar programaticamente as células na linha usando o Cells coleção.

Para obter informações detalhadas sobre o TableRow Propriedades e eventos de controle de servidor de Web, consulte o TableRow documentação da classe.

Exemplo

O exemplo a seguir mostra como usar um TableRow objeto para adicionar uma linha para um Table controle.

' Create more rows for the table.
Dim rowNum As Integer
For rowNum = 2 To 9
    Dim tempRow As New TableRow()
    Dim cellNum As Integer
    For cellNum = 0 To 2
        Dim tempCell As New TableCell()
        tempCell.Text = _
            String.Format("({0},{1})", rowNum, cellNum)
        tempRow.Cells.Add(tempCell)
    Next
    Table1.Rows.Add(tempRow)
Next
// Create more rows for the table.
for (int rowNum = 2; rowNum < 10; rowNum++)
{
    TableRow tempRow = new TableRow();
    for (int cellNum = 0; cellNum < 3; cellNum++)
    {
        TableCell tempCell = new TableCell();
        tempCell.Text = 
            String.Format("({0},{1})", rowNum, cellNum);
        tempRow.Cells.Add(tempCell);
    }
    Table1.Rows.Add(tempRow);
}

Consulte também

Referência

TableRow

Outros recursos

controle de servidor Web sintaxe