Tab

ASPxCardViewExportRenderingEventArgs.ImageValue Property

Gets or sets an array of bytes that contains the processed brick’s image.

Namespace: DevExpress.Web

Assembly: DevExpress.Web.v21.1.dll

Declaration

public byte[] ImageValue { get; set; }

Property Value

Type Description
Byte[]

An array of bytes that contains the processed brick’s binary image.

Remarks

Use the ImageValue property to obtain and specify the processed brick’s image. The ImageValue property is in effect for the following column types:

  • CardViewBinaryImageColumn - the ImageValue property returns an array of bytes that contains the processed brick’s image.
  • CardViewImageColumn - the ImageValue property returns null. However, you can specify the binary image value to be exported.

For other column types, the ImageValue property returns null.

Example

The following example exports images displayed in the CardViewImageColumn. To export images, handle the RenderBrick event and populate its argument ImageValue property with an image in the binary format.

View Example

<table>
    <tr>
        <td style="padding-right: 4px">
            <dx:ASPxButton ID="btnPdfExport" runat="server" Text="Export to PDF" OnClick="btnPdfExport_Click" />
        </td>
        <td style="padding-right: 4px">
            <dx:ASPxButton ID="btnXlsExport" runat="server" Text="Export to XLS" OnClick="btnXlsExport_Click" />
        </td>
        <td style="padding-right: 4px">
            <dx:ASPxButton ID="btnXlsxExport" runat="server" Text="Export to XLSX" OnClick="btnXlsxExport_Click" />
        </td>
        <td style="padding-right: 4px">
            <dx:ASPxButton ID="btnRtfExport" runat="server" Text="Export to RTF" OnClick="btnRtfExport_Click" />
        </td>
        <td>
            <dx:ASPxButton ID="btnCsvExport" runat="server" Text="Export to CSV" OnClick="btnCsvExport_Click" />
        </td>
    </tr>
</table>  
<dx:ASPxCardView ID="CardView1" runat="server" AutoGenerateColumns="False" DataSourceID="XmlDataSource1">
    <Columns>
        <dx:CardViewTextColumn Caption="Common Name" FieldName="Common_Name" VisibleIndex="0">
        </dx:CardViewTextColumn>
        <dx:CardViewTextColumn Caption="Species Name" FieldName="Species_Name" VisibleIndex="1">
        </dx:CardViewTextColumn>
        <dx:CardViewImageColumn Caption="Image" FieldName="ImagePath" VisibleIndex="2">
            <PropertiesImage ImageHeight="120px" ImageWidth="180px">
            </PropertiesImage>
        </dx:CardViewImageColumn>
    </Columns>
</dx:ASPxCardView>
<dx:ASPxCardViewExporter CardWidth="310" ID="CardViewExporter" CardViewID="CardView1" OnRenderBrick="ASPxCardViewExporter1_RenderBrick" runat="server"></dx:ASPxCardViewExporter>  
<asp:XmlDataSource ID="XmlDataSource1" runat="server" DataFile="~/App_Data/Fishes.xml" />
See Also