HtmlTableRowCollection.RemoveAt メソッドとは? わかりやすく解説

Weblio 辞書 > コンピュータ > .NET Framework クラス ライブラリ リファレンス > HtmlTableRowCollection.RemoveAt メソッドの意味・解説 

HtmlTableRowCollection.RemoveAt メソッド

指定したインデックス位置にある HtmlTableRow オブジェクトHtmlTableRowCollection コレクションから削除します

名前空間: System.Web.UI.HtmlControls
アセンブリ: System.Web (system.web.dll 内)
構文構文

Public Sub RemoveAt ( _
    index As Integer _
)
Dim instance As HtmlTableRowCollection
Dim index As Integer

instance.RemoveAt(index)
public void RemoveAt (
    int index
)
public:
void RemoveAt (
    int index
)
public void RemoveAt (
    int index
)

パラメータ

index

HtmlTableRowCollection から削除する HtmlTableRow のインデックス

例外例外
解説解説
使用例使用例

RemoveAt メソッド使用して指定したインデックス位置にある項目を HtmlTableRowCollection コレクションから削除する方法次のコード例示します。この例では、HtmlTable コントロール最初の行を削除します

<%@ Page Language="VB" AutoEventWireup="True"
 %>

<script runat="server">
  
  Sub Button_Click(ByVal sender As
 Object, ByVal e As EventArgs)
 
    ' Remove the first row from the table.
    Table1.Rows.RemoveAt(0)

  End Sub

</script>

<html>
<head>
   <title>HtmlTableRowCollection Example</title>
</head>
<body>

   <form runat="server">

      <h3>HtmlTableRowCollection Example</h3>

      <table id="Table1" 
             border="1" 
             bordercolor="black" 
             runat="server">

         <tr>
            <td>
               Cell 1
            </td>
            <td>
               Cell 2
            </td>
         </tr>
         <tr>
            <td>
               Cell 3
            </td>
            <td>
               Cell 4
            </td>
         </tr>

      </table>

      <br><br>
  
      <input type="button" 
             value="Remove First Row from Table"
             onserverclick="Button_Click" 
             runat="server"/>

   </form>

</body>
</html>
<%@ Page Language="C#" AutoEventWireup="True" %>

<script runat="server">

  void Button_Click(Object sender, EventArgs e)
  {

    // Remove the first row from the table.
    Table1.Rows.RemoveAt(0);

  }

</script>

<html>
<head>
   <title>HtmlTableRowCollection Example</title>
</head>
<body>

   <form runat="server">

      <h3>HtmlTableRowCollection Example</h3>

      <table id="Table1" 
             border="1" 
             bordercolor="black" 
             runat="server">

         <tr>
            <td>
               Cell 1
            </td>
            <td>
               Cell 2
            </td>
         </tr>
         <tr>
            <td>
               Cell 3
            </td>
            <td>
               Cell 4
            </td>
         </tr>

      </table>

      <br><br>
  
      <input type="button" 
             value="Remove First Row from Table"
             onserverclick="Button_Click" 
             runat="server"/>

   </form>

</body>
</html>
<%@ Page Language="JScript" AutoEventWireup="True" %>

<script runat="server">

  function Button_Click(sender, e : EventArgs) 
  {
 
    // Remove the first row from the table.
    Table1.Rows.RemoveAt(0);

  }

</script>

<html>
<head>
   <title>HtmlTableRowCollection Example</title>
</head>
<body>

   <form runat="server">

      <h3>HtmlTableRowCollection Example</h3>

      <table id="Table1" 
             border="1" 
             bordercolor="black" 
             runat="server">

         <tr>
            <td>
               Cell 1
            </td>
            <td>
               Cell 2
            </td>
         </tr>
         <tr>
            <td>
               Cell 3
            </td>
            <td>
               Cell 4
            </td>
         </tr>

      </table>

      <br><br>
  
      <input type="button" 
             value="Remove First Row from Table"
             onserverclick="Button_Click" 
             runat="server"/>

   </form>

</body>
</html>
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照
関連項目
HtmlTableRowCollection クラス
HtmlTableRowCollection メンバ
System.Web.UI.HtmlControls 名前空間
Remove
HtmlTable.Rows プロパティ
HtmlTableRow クラス


このページでは「.NET Framework クラス ライブラリ リファレンス」からHtmlTableRowCollection.RemoveAt メソッドを検索した結果を表示しています。
Weblioに収録されているすべての辞書からHtmlTableRowCollection.RemoveAt メソッドを検索する場合は、下記のリンクをクリックしてください。
 全ての辞書からHtmlTableRowCollection.RemoveAt メソッド を検索

英和和英テキスト翻訳>> Weblio翻訳
英語⇒日本語日本語⇒英語
  

辞書ショートカット

すべての辞書の索引

HtmlTableRowCollection.RemoveAt メソッドのお隣キーワード
検索ランキング

   

英語⇒日本語
日本語⇒英語
   



HtmlTableRowCollection.RemoveAt メソッドのページの著作権
Weblio 辞書 情報提供元は 参加元一覧 にて確認できます。

   
日本マイクロソフト株式会社日本マイクロソフト株式会社
© 2025 Microsoft.All rights reserved.

©2025 GRAS Group, Inc.RSS