Gets or sets the way parent row labels are displayed.
[Visual Basic] Public Property ParentRowsLabelStyle As _ DataGridParentRowsLabelStyle [C#] public DataGridParentRowsLabelStyle ParentRowsLabelStyle {get; set;} [C++] public: __property DataGridParentRowsLabelStyle get_ParentRowsLabelStyle(); public: __property void set_ParentRowsLabelStyle(DataGridParentRowsLabelStyle); [JScript] public function get ParentRowsLabelStyle() : DataGridParentRowsLabelStyle; public function set ParentRowsLabelStyle(DataGridParentRowsLabelStyle);
One of the ParentRowsLabelStyle values. The default is Both.
Exception Type | Condition |
---|---|
InvalidEnumArgumentException | The enum wasn't valid. |
The following example sets cycles through the possible values for the ParentRowsLabelStyle property.
[Visual Basic]
Private Sub ChangeParentRowLabels(ByVal myGrid As DataGrid) Static currentLabelStyle As Integer If currentLabelStyle = 4 Then currentLabelStyle = 0 Select Case currentLabelStyle Case 0 myGrid.ParentRowsLabelStyle = ParentRowsLabelStyle.None Case 1 myGrid.ParentRowsLabelStyle = ParentRowsLabelStyle.TableName Case 2 myGrid.ParentRowsLabelStyle = ParentRowsLabelStyle.ColumnName Case 3 myGrid.ParentRowsLabelStyle = ParentRowsLabelStyle.Both Case Else myGrid.ParentRowsLabelStyle = ParentRowsLabelStyle.Both End Select End Sub
DataGrid Class | DataGrid Members | System.WinForms Namespace | NavigationMode | ParentRowsForeColor | ParentRowsBackColor | ParentRowsVisible