NGWS SDK Documentation  

This is preliminary documentation and subject to change.
To comment on this topic, please send us email at ngwssdk@microsoft.com. Thanks!

DataGrid.ParentRowsLabelStyle

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);

Property Value

One of the ParentRowsLabelStyle values. The default is Both.

Exceptions

Exception Type Condition
InvalidEnumArgumentException The enum wasn't valid.

Example [Visual Basic]

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

See Also

DataGrid Class | DataGrid Members | System.WinForms Namespace | NavigationMode | ParentRowsForeColor | ParentRowsBackColor | ParentRowsVisible