-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.vb
More file actions
25 lines (22 loc) · 1.02 KB
/
Form1.vb
File metadata and controls
25 lines (22 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
Imports System.Windows.Forms
Imports DevExpress.XtraPivotGrid
Imports DevExpress.XtraEditors
Namespace WinFormsPivotGridFormatRules
Public Partial Class Form1
Inherits Form
Public Sub New()
InitializeComponent()
salesPersonTableAdapter1.Fill(nwindDataSet1.SalesPerson)
' Creates a new FormatRule object.
Dim newRule As PivotGridFormatRule = New PivotGridFormatRule()
' Sets a Measure.
newRule.Measure = fieldExtendedPrice
' Creates and specifies a new Settings object.
newRule.Settings = New FormatRuleFieldIntersectionSettings With {.Column = fieldOrderYear1, .Row = fieldSalesPerson}
' Creates a new Rule object and sets its parameters.
newRule.Rule = New FormatConditionRuleDataBar With {.PredefinedName = "Yellow Gradient"}
' Adds the rule to the collection.
pivotGridControl1.FormatRules.Add(newRule)
End Sub
End Class
End Namespace