Skip to content

DevExpress-Examples/asp-net-web-forms-grid-template-binaryimage-bound-to-ole-objects

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

31 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

License

Stars

Watchers

Forks

Contributors 2

  •  
  •