DataGridParentRowsLabelStyle 列挙体
DataGrid コントロールの親行ラベルの表示方法を指定します。
<Serializable>
Public Enum DataGridParentRowsLabelStyle
[C#]
[Serializable]
public enum DataGridParentRowsLabelStyle
[C++]
[Serializable]
__value public enum DataGridParentRowsLabelStyle
[JScript]
public
Serializable
enum DataGridParentRowsLabelStyle
解説
この列挙体のメンバを使用して、 ParentRowsLabelStyle プロパティの値を設定します。
DataGrid に第 2 の DataTable への DataRelation が少なくとも 1 つある場合や、 AllowNavigation プロパティが移動を許可する値に設定されている場合だけ、親行が表示されます。
メンバ
メンバ名 | 説明 |
---|---|
Both | 親テーブル名と列名の両方を表示します。 |
ColumnName | 親列名を表示します。 |
None | 親行ラベルは表示しません。 |
TableName | 親テーブル名を表示します。 |
使用例
[Visual Basic] DataGridParentRowsLabelStyle に指定できる値を反復処理する例を次に示します。
Private Sub ChangeParentRowLabels(ByVal myGrid As DataGrid)
Static currentLabelStyle As Integer
If currentLabelStyle = 4 Then currentLabelStyle = 0
Select Case currentLabelStyle
Case 0
myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.None
Case 1
myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.TableName
Case 2
myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.ColumnName
Case 3
myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
Case Else
myGrid.ParentRowsLabelStyle = DataGridParentRowsLabelStyle.Both
End Select
' Increment the variable.
currentLabelStyle+=1
End Sub
[C#, C++, JScript] C#、C++、および JScript のサンプルはありません。Visual Basic のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
名前空間: System.Windows.Forms
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
アセンブリ: System.Windows.Forms (System.Windows.Forms.dll 内)
参照
System.Windows.Forms 名前空間 | DataGrid | DataTable | DataRelation | ParentRowsForeColor | ParentRowsBackColor | ParentRowsLabelStyle | ParentRowsVisible | AllowNavigation