DataGridViewRow.Frozen プロパティ
アセンブリ: System.Windows.Forms (system.windows.forms.dll 内)

Dim instance As DataGridViewRow Dim value As Boolean value = instance.Frozen instance.Frozen = value
/** @property */ public boolean get_Frozen () /** @property */ public void set_Frozen (boolean value)
public override function get Frozen () : boolean public override function set Frozen (value : boolean)
行が固定された状態の場合は true。それ以外の場合は false。


このプロパティを使用すると、ユーザーが DataGridView をスクロールした場合でも、重要な情報のある 1 つまたは複数の行を同じ位置に固定したままの状態にできます。固定された状態の行の上にあるすべての行も固定された状態になります。

DataGridViewBand.Frozen プロパティを使用する方法を次のコード例に示します。このプロパティは、DataGridViewRow クラスの Frozen プロパティとほぼ同じです。このコード例は、DataGridViewBand クラスのトピックで取り上げているコード例の一部分です。
' Freeze the first row. Private Sub Button4_Click(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Button4.Click FreezeBand(dataGridView.Rows(0)) End Sub Private Sub FreezeColumn(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles Button5.Click FreezeBand(dataGridView.Columns(1)) End Sub Private Shared Sub FreezeBand(ByVal band As DataGridViewBand) band.Frozen = True Dim style As DataGridViewCellStyle = New DataGridViewCellStyle() style.BackColor = Color.WhiteSmoke band.DefaultCellStyle = style End Sub
// Freeze the first row. private void Button4_Click(object sender, System.EventArgs e) { FreezeBand(dataGridView.Rows[0]); } private void Button5_Click(object sender, System.EventArgs e) { FreezeBand(dataGridView.Columns[1]); } private static void FreezeBand(DataGridViewBand band) { band.Frozen = true; DataGridViewCellStyle style = new DataGridViewCellStyle(); style.BackColor = Color.WhiteSmoke; band.DefaultCellStyle = style; }

Windows 98, Windows 2000 SP4, Windows CE, Windows Millennium Edition, Windows Mobile for Pocket PC, Windows Mobile for Smartphone, Windows Server 2003, Windows XP Media Center Edition, Windows XP Professional x64 Edition, Windows XP SP2, Windows XP Starter Edition
開発プラットフォームの中には、.NET Framework によってサポートされていないバージョンがあります。サポートされているバージョンについては、「システム要件」を参照してください。


Weblioに収録されているすべての辞書からDataGridViewRow.Frozen プロパティを検索する場合は、下記のリンクをクリックしてください。

- DataGridViewRow.Frozen プロパティのページへのリンク