Progress® Telerik® Reporting R3 2017

ReportViewerInteractiveActionExecuting Event

Occurs when an action is being executed. Execution can be canceled.

Namespace:  Telerik.ReportViewer.Silverlight
Assembly:  Telerik.ReportViewer.Silverlight (in Telerik.ReportViewer.Silverlight.dll)

Syntax

public event InteractiveActionExecutingEventHandler InteractiveActionExecuting

Value

Type: Telerik.ReportViewer.SilverlightInteractiveActionExecutingEventHandler

Examples

This example illustrates how to wire the ActionExecuted event and use the event arguments
// Handles the InteractiveActionExecuting event
void ReportViewer1_CustomInteractiveActionExecuting(object sender, InteractiveActionCancelEventArgs args)
{
    var strB = new System.Text.StringBuilder();
    strB.AppendLine("ReportItem name: " + args.Action.ReportItemName);

    if (args.Action.Type == Telerik.Reporting.Service.ActionType.CustomAction)
    {
        foreach (var p in args.Action.Parameters)
        {
            strB.AppendLine(string.Format("Parameter \"{0}\" value: {1}", p.Key, p.Value));
        }
    }

    strB.AppendLine(string.Format("Mouse cursor position: {0}; Item bounds: {1}", args.CursorPos, args.Bounds));

    System.Diagnostics.Debug.WriteLine(strB.ToString());
}
// Handles the InteractiveActionExecuting event
void ReportViewer1_CancelingInteractiveActionExecuting(object sender, InteractiveActionCancelEventArgs args)
{
    if (args.Action.Type == Telerik.Reporting.Service.ActionType.UrlNavigation)
    {
        if (!args.Action.Url.StartsWith("https"))
        {
            args.Cancel = MessageBox.Show("You are about to navigate to a non-secure page. Continue?", "Warning", MessageBoxButton.OKCancel) != MessageBoxResult.OK;
        }
    }
}

See Also