Edit this page

Customizing the Dialogs

To customize the dialogs in RadPivotGrid/RadPivotFieldList, you can either inherit from them to override/extend the base functionality or you can create an entirely custom dialogs by implementing the corresponding dialog interface.

Figure 1: Custom Header Text

pivotgrid-dialogs-customizing-the-dialogs 001

Custom AggregateOptionsDialog

class MyAggregateOptionsDialog : AggregateOptionsDialog
    public override void LoadSettings(Telerik.Pivot.Core.PropertyAggregateDescriptionBase aggregateDescription)
        this.Text = "This is a custom dialog";

Class MyAggregateOptionsDialog
    Inherits AggregateOptionsDialog
    Public Overrides Sub LoadSettings(aggregateDescription As Telerik.Pivot.Core.PropertyAggregateDescriptionBase)
        Me.Text = "This is a custom dialog"
    End Sub
End Class

When RadPivotGrid and RadPivotFieldList need a dialog, they use the PivotGridDialogsFactory to create an instance of a dialog. To replace the default dialogs with your custom ones, you need to implement a custom factory as show below.

Custom PivotGridDialogsFactory

class MyDialogsFactory : PivotGridDialogsFactory
    public override IAggregateOptionsDialog CreateAggregateOptionsDialog()
        return new MyAggregateOptionsDialog();

Class MyDialogsFactory
    Inherits PivotGridDialogsFactory
    Public Overrides Function CreateAggregateOptionsDialog() As IAggregateOptionsDialog
        Return New MyAggregateOptionsDialog()
    End Function
End Class

Then, you need to assign it to RadPivotGrid and RadPivotFieldList:

Set Custom Factory

this.radPivotGrid1.DialogsFactory = new MyDialogsFactory();
this.radPivotFieldList1.DialogsFactory = new MyDialogsFactory();

Me.radPivotGrid1.DialogsFactory = New MyDialogsFactory()
Me.radPivotFieldList1.DialogsFactory = New MyDialogsFactory()

See Also