DataGridViewRow.Visible Property


행 표시 되는지 여부를 나타내는 값을 가져오거나 설정 합니다.Gets or sets a value indicating whether the row is visible.

 virtual property bool Visible { bool get(); void set(bool value); };
public override bool Visible { get; set; }
member this.Visible : bool with get, set
Public Overrides Property Visible As Boolean

Property Value


행이 표시되면 true이고, 그렇지 않으면 false입니다.true if the row is visible; otherwise, false.



행이 DataGridView 컨트롤 안에 있고 공유 행인 경우The row is in a DataGridView control and is a shared row.


다음 코드 예제에서는 DataGridViewRow 클래스의 Visible 속성과 거의 동일한 DataGridViewBand.Visible 속성을 사용 하는 방법을 보여 줍니다.The following code example demonstrates how to use the DataGridViewBand.Visible property, which is nearly identical to the Visible property of the DataGridViewRow class. 이 코드 예제는에 대해 제공 된 큰 예제의 일부는 DataGridViewBand 클래스입니다.This code example is part of a larger example provided for the DataGridViewBand class.

// Hide a band of cells.
void Button6_Click( Object^ /*sender*/, System::EventArgs^ /*e*/ )
   DataGridViewBand^ band = dataGridView->Rows[ 3 ];
   band->Visible = false;

// Hide a band of cells.
private void Button6_Click(object sender, System.EventArgs e)

    DataGridViewBand band = dataGridView.Rows[3];
    band.Visible = false;
' Hide a band of cells.
Private Sub Button6_Click(ByVal sender As Object, _
    ByVal e As System.EventArgs) Handles Button6.Click

    Dim band As DataGridViewBand = dataGridView.Rows(3)
    band.Visible = False
End Sub


DataGridView행을 유지 하면서 뷰에서 행을 숨기려면이 속성을 사용 합니다.Use this property to hide a row from view while keeping the row in the DataGridView. 행을 완전히 제거 하려면 DataGridViewRowCollection.Remove 메서드를 사용 합니다.To completely remove a row, use the DataGridViewRowCollection.Remove method.

Applies to

See also