Skip to content

Commit abdf13f

Browse files
authored
Merge pull request #78 from vladimirlashko/ProgressBarPropertyEditor
fix ProgressBar formatting in PivotGrid
2 parents 7fd6850 + 6ab736e commit abdf13f

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

CS/OutlookInspired.Win/Editors/ProgressEditor/PropertyEditorController.cs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
using DevExpress.ExpressApp.Editors;
44
using DevExpress.ExpressApp.Model;
55
using DevExpress.ExpressApp.Win.Editors;
6+
using DevExpress.Utils;
67
using DevExpress.XtraEditors.Repository;
78
using DevExpress.XtraPivotGrid;
89

@@ -54,7 +55,11 @@ protected override void OnViewControlsCreated(){
5455
var pivotGridControl = pivotGridListEditor.PivotGridControl;
5556
var repositoryItems = AddRepositoryItems(pivotGridControl,View);
5657
pivotGridControl.CustomCellEdit += (_, e) => {
57-
if (!repositoryItems.TryGetValue(e.DataField, out var item)) return;
58+
if (!repositoryItems.TryGetValue(e.DataField, out var item)) return;
59+
if (item is XafRepositoryItemProgressBar xafRepositoryItemProgressBar) {
60+
xafRepositoryItemProgressBar.DisplayFormat.FormatType = FormatType.Custom;
61+
xafRepositoryItemProgressBar.DisplayFormat.FormatString = "{0:P0}";
62+
}
5863
e.RepositoryItem = item;
5964
};
6065
pivotGridControl.CustomDrawCell += (_, e) => {

0 commit comments

Comments
 (0)