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

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

DataGrid.IsExpanded メソッド

指定した行のノード展開するか、折りたたむかを示す値を取得します

名前空間: System.Windows.Forms
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)
構文構文

Public Function IsExpanded ( _
    rowNumber As Integer _
) As Boolean
Dim instance As DataGrid
Dim rowNumber As Integer
Dim returnValue As Boolean

returnValue = instance.IsExpanded(rowNumber)
public bool IsExpanded (
    int rowNumber
)
public:
bool IsExpanded (
    int rowNumber
)
public boolean IsExpanded (
    int rowNumber
)
public function IsExpanded (
    rowNumber : int
) : boolean

パラメータ

rowNumber

該当する行の番号

戻り値
ノード展開する場合trueそれ以外場合false

使用例使用例

グリッド内の各行テストし展開されている行の行番号出力するコード例次に示します

Protected Sub TextExpanded(myGrid As
 DataGrid)
    ' Get the DataTable of the grid
    Dim myTable As DataTable
    ' Assuming the grid is bound to a DataTable
    myTable = CType(myGrid.DataSource, DataTable)
    Dim i As Integer
    For i = 0 To myTable.Rows.Count - 1
        If myGrid.IsExpanded(i) Then
            Console.WriteLine(("Row " & i &
 " was expanded"))
        End If
    Next i
End Sub 'TextExpanded
protected void TextExpanded(DataGrid myGrid){
    // Get the DataTable of the grid
    DataTable myTable;
    // Assuming the grid is bound to a DataTable
    myTable = (DataTable) myGrid.DataSource;
    for(int i = 0;i < myTable.Rows.Count
 ;i++) {
       if(myGrid.IsExpanded(i)) {
          Console.WriteLine("Row " + i + " was expanded");
       }
    }
 }
    
protected:
   void TextExpanded( DataGrid^ myGrid )
   {
      // Get the DataTable of the grid
      DataTable^ myTable;
      // Assuming the grid is bound to a DataTable
      myTable = (DataTable^)(myGrid->DataSource);
      for ( int i = 0; i < myTable->Rows->Count;
 i++ )
      {
         if ( myGrid->IsExpanded( i ) )
         {
            Console::WriteLine( "Row {0} was expanded", i );
         }
      }
   }
protected void TextExpanded(DataGrid myGrid)
{
    // Get the DataTable of the grid
    DataTable myTable;
    // Assuming the grid is bound to a DataTable
    myTable = (DataTable)(myGrid.get_DataSource());
    for (int i = 0; i < myTable.get_Rows().get_Count();
 i++) {
        if (myGrid.IsExpanded(i)) {
            Console.WriteLine("Row " + i + " was expanded");
        }
    }
} //TextExpanded
プラットフォームプラットフォーム
バージョン情報バージョン情報
参照参照


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

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

辞書ショートカット

すべての辞書の索引

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

   

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



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

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

©2025 GRAS Group, Inc.RSS