Returns

Remarks

The Cast method is implemented as a part of the JavaScript IntelliSense support for DevExpress ASP.NET controls and MVC extensions. So, using the Cast method is sensible when you intend to use IntelliSense during writing JavaScript code at design time with the help of the DevExpress client API.

A call to the Cast method (which is a static method) casts the specified client object to the ASPxClientReportDesigner type. As a result, the object's type is now known and ASPxClientReportDesigner type specific IntelliSense information can be displayed for this client object, facilitating your coding.

Converting a client object accessed by using the value of the ClientInstanceName (or ID) property. For instance, if a web control's ClientInstanceName property is set to 'ASPxClientReportDesigner1', the object can be type cast in the following manner:

Declaration

Parameters

PerformCallback(arg) Method

Sends a callback to the server and generates the server-side event, passing it the specified argument.

Declaration

PerformCallback(arg: string, onSuccess?: (arg: string) => void): void

Parameters

Name

Type

Description

arg

string

A string value that represents any information that needs to be sent to the server-side event.

Optional Parameters

Name

Type

Default

Description

onSuccess

(arg: string) => void

null

A client action to perform if the server round-trip completed successfully.

Remarks

Use the PerformCallback method if you need to asynchronously go to the server and perform server-side processing using AJAX-based callback technology. You can pass the required information which can be collected on the client side as a string of arguments using the PerformCallback method args parameter. The onSuccess parameter allows you to specify a client function that should be executed after the server round-trip completed successfully.

Remarks

The CallbackError event enables you to properly respond to a server error occurring as a result of a callback being processed on the server side. Handle this event to perform specific client-side actions, such as displaying explanatory text or an image related to the error.

Typically, a server error which occurs during server-side processing of a callback, leads to web application hanging, because, in this case, no proper response is generated for a control that initiated the callback. However, AJAX-enabled web controls from the DevExpress product line are able to automatically catch server errors occurring within handlers of their server-side events, and to pass the related error information to the client for further processing through the CallbackError event's argument.

Remarks

The ASPxClientCustomizeElementsEventArgs.GetById method allows you to obtain the required element by its ID using the DevExpress.Designer.Report.ReportDesignerElements object. The following elements are available within this object:

MenuButton - corresponds to the menu button in the upper-left corner of the Designer's user interfaces.

NavigationPanel - corresponds to the panel at the bottom of the Designer displaying opened report tabs.

For this example to work correctly, reports in your storage should be divided into categories. The ReportStorageWebExtension.GetUrls method should return a dictionary with report URLs and display names in the following format: "CategoryName\ReportName".

Remarks

The following example demonstrates how to sort look-up values of the categoryName parameter based on a custom rule. Declare an array that has category names in a sequence based on the required criterion. Then, check the parameter property of the event argument to identify the required parameter. Access look-up values using the items property and sort them using a custom sorting function, which compares indexes of categories in the array. Finally, pass a result to the dataSource property to apply changes.

For this example to work correctly, reports in your storage should be divided into categories. The ReportStorageWebExtension.GetUrls method should return a dictionary with report URLs and display names in the following format: "CategoryName\ReportName".

Remarks

The ASPxClientCustomizeElementsEventArgs.GetById method allows you to obtain the required element by its ID using the DevExpress.Report.Preview.PreviewElements object. The following elements are available within this object:

HideProperties - Hides the specified options for the specified export format from the Export Options panel. To remove all options for a particular export format, specify only the first method parameter.

GetExportOptionsModel - Returns the export options model for the specified export format. You can then use this model to customize various export options, for instance, change a specific option's default value.

Specifies whether or not the operation performed with a report should be canceled.

Remarks

Handle the ReportSaving event to perform required actions before a report is saved to a server-side report storage of the Web Report Designer. To prevent the report from being saved, set the ASPxClientReportDesignerDialogCancelEventArgs.Cancel property of an event argument to true.

The following example demonstrates how to use this event to prohibit saving reports under specific URLs.