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

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

HtmlTableRowCollection.Remove メソッド

指定した HtmlTableRow オブジェクトHtmlTableRowCollection コレクションから削除します

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

Public Sub Remove ( _
    row As HtmlTableRow _
)
Dim instance As HtmlTableRowCollection
Dim row As HtmlTableRow

instance.Remove(row)
public void Remove (
    HtmlTableRow row
)
public:
void Remove (
    HtmlTableRow^ row
)
public void Remove (
    HtmlTableRow row
)
public function Remove (
    row : HtmlTableRow
)

パラメータ

row

HtmlTableRowCollection から削除する HtmlTableRow。

解説解説

このメソッド使用して指定した HtmlTableRow オブジェクトHtmlTableRowCollection コレクションから削除します

メモメモ

HtmlTableRowCollection存在しない HtmlTableRow指定した場合、項目はコレクションから削除されません。

使用例使用例

Remove メソッド使用してHtmlTableRowCollection コレクションから、HtmlTableRow オブジェクトが表す指定したテーブルの行を削除する方法次のコード例示します。この例では 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.
    Dim row As HtmlTableRow = Table1.Rows(0)
    Table1.Rows.Remove(row)

  End Sub

</script>

<html>
<head>
   <title>HtmlTableRowCollectionExample</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.
    HtmlTableRow row = Table1.Rows[0];
    Table1.Rows.Remove(row);

  }

</script>

<html>
<head>
   <title>HtmlTableRowCollectionExample</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.
    var row : HtmlTableRow = Table1.Rows[0];
    Table1.Rows.Remove(row);

  }

</script>

<html>
<head>
   <title>HtmlTableRowCollectionExample</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 名前空間
RemoveAt
HtmlTable.Rows プロパティ
HtmlTableRow クラス



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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS