Skip to content

Latest commit

 

History

67 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Grid View for ASP.NET Web Forms - How to use ASPxBinaryImage to bind a field that contains image data stored as OLE objects

If your data source contains images in a custom format (for instance, OLE Objects), the ASPxGridView control cannot bind data automatically. Follow the steps below to display the images in the grid:

  1. Create DataItemTemplate for an image column.
  2. Place the ASPxBinaryImage control in the template.
  3. Write a function to transform images from your format to an array of bytes.
  4. Use a custom binding expression to bind the ASPxBinaryImage.Value property to the transformed data.
<dx:GridViewDataTextColumn Caption="Image" FieldName="Image" >
    <DataItemTemplate>
        <dx:ASPxBinaryImage ID="ASPxBinaryImage1" runat="server" 
            Value='<%# ConvertOleObjectToByteArray(Eval("Image")) %>' />
    </DataItemTemplate>
</dx:GridViewDataTextColumn>

Files to Review

Online Demo

Does This Example Address Your Development Requirements/Objectives?

(you will be redirected to DevExpress.com to submit your response)

About

Display images stored as OLE objects.

Topics

Resources

Stars

0 stars

Watchers

53 watching

Forks

Used by

Contributors

Languages