-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathForm1.vb
More file actions
29 lines (24 loc) · 1.06 KB
/
Form1.vb
File metadata and controls
29 lines (24 loc) · 1.06 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
26
27
28
29
Imports DevExpress.XtraPivotGrid
Public Class Form1
Sub New()
InitializeComponent()
SalesPersonTableAdapter1.Fill(NwindDataSet1.SalesPerson)
fieldCountry.FilterValues.FilterType = PivotFilterType.Included
fieldCountry.FilterValues.Add("UK")
End Sub
Private Sub PivotGridControl1_CustomCellDisplayText(sender As System.Object,
e As DevExpress.XtraPivotGrid.PivotCellDisplayTextEventArgs) Handles PivotGridControl1.CustomCellDisplayText
' In this example, if a row total value is less than 2000, 'Low' is displayed instead.
' If the value exceeds 6000, 'High' is displayed; otherwise, 'Middle'.
If e.RowValueType = PivotGridValueType.Total OrElse e.ColumnValueType <> PivotGridValueType.Total Then
Return
End If
If Convert.ToSingle(e.Value) < 2000 Then
e.DisplayText = "Low"
ElseIf Convert.ToSingle(e.Value) > 6000 Then
e.DisplayText = "High"
Else
e.DisplayText = "Middle"
End If
End Sub
End Class