Try OpenEdge Now
skip to main content
GUI for .NET Programming
Binding ABL Data to .NET Controls : Understanding the ProBindingSource : Programming considerations : Binding .NET controls to BLOB fields
 
Binding .NET controls to BLOB fields
Binding .NET controls to an ABL BLOB (a Binary Large Object) field requires special care. You need to know that the ProBindingSource exposes the BLOB data type to the .NET control as a .NET System.Byte[] data type.
You also need to know if the .NET control can render the BLOB's contents appropriately. Check the .NET control's user documentation to see if it can render the type of file that the BLOB represents. A particular .NET control might not be able to render the BLOB at all. In other cases, your application might need to perform some extra step before the .NET control can properly display the BLOB's contents.
For example, consider binding a BLOB that represents an image to a grid. A Microsoft System.Windows.Forms.DataGridView automatically represents the BLOB with the Systems.Windows.Forms.DataGridViewImageColumn class. If the BLOB is not in a recognized format, the class throws an error and displays a default image in the column's cells.
However, when you bind the same BLOB field to an Infragistics.Win.UltraWinGrid.UltraGrid, the grid represents the BLOB field as an UltraGridColumn of the System.Byte[] data type. The UltraGridColumn cannot directly display the image. You must then add an editor control to the column using something like the following code:
myGrid:DisplayLayout:Bands[0]:Columns[1]:Editor =
  NEW Infragistics.Win.EmbeddableImageRender().