ASPxClientReportDesigner.PreviewClick Event
Occurs when the left mouse button is clicked on a report document in Print Preview.
Namespace: DevExpress.XtraReports.Web.Scripts
Assembly: DevExpress.XtraReports.v18.2.Web.Scripts.dll
Declaration
Event Data
The PreviewClick event's data class is ASPxClientPreviewClickEventArgs. The following properties provide information specific to this event:
Property | Description |
---|---|
Brick | Provides information on a visual brick representing content of a report control that has been clicked. |
Handled | Specifies whether or not the event was handled and no default processing is required. |
PageIndex | Gets a value specifying the zero-based index of the page that has been clicked. |
The event data class exposes the following methods:
Method | Description |
---|---|
DefaultHandler() | Specifies the default function used to handle the ASPxClientWebDocumentViewer.PreviewClick event. |
GetBrickText() | Returns the text displayed by the ASPxClientPreviewClickEventArgs.Brick. |
GetBrickValue() | Returns a string providing additional information on the ASPxClientPreviewClickEventArgs.Brick. |
GetBrickValue(String) | Returns a string providing additional information about the current ASPxClientPreviewClickEventArgs.Brick by the specified key. |
Remarks
Handle the PreviewClick event to perform different actions when an end-user clicks the report document in the Document Viewer built into the Web Report Designer. You can obtain a text displayed by the corresponding report element using the ASPxClientPreviewClickEventArgs.GetBrickText method and additional brick information (the XRControl.Tag property value) using the ASPxClientPreviewClickEventArgs.GetBrickValue method.
The following code snippet demonstrates how to obtain the text of an element that has been clicked.
<script type="text/javascript" id="script">
function previewClick(s, e) {
e.Brick && alert(e.GetBrickText())
}
</script>
<dx:ASPxWebDocumentViewer ID="ASPxWebDocumentViewer1" runat="server" ReportSourceId="WebReportDesigner.XtraReport1">
<ClientSideEvents PreviewClick="previewClick"/>
</dx:ASPxWebDocumentViewer>