I am converting a MS Access application to VB.NET 2005 with IG 2008.2.2121. On one of the existing forms in Access, there is a grid with a column that displays a document link icon. The user can either open that file or choose a new file to link to. Access handles all of this natively without much code required. However, I am having some issues trying to figure out how to implement the same sort of behavior in our new application. First of all, the field that should display the document link shows up as follows:
How do I tell the WinGrid to display it as a document link? The datatype in the Sql table is Image. Also, if there isn't a file stored, how would I be able to implement the open file dialog so that the user could choose the file to link to?
I would greatly appreciate any assistance you could provide,~Kelly
Hi Brian and Mike,
I tried both options in initialize layout but had the same result - blank cells.
.Columns("Linked_Record").Style = Infragistics.Win.UltraWinGrid.ColumnStyle.Image .Columns("Linked_Record").Editor = New Infragistics.Win.EmbeddableImageRenderer()
If you have any other suggestions I would grealy appreciate it!
Thanks,Kelly
Hi Kelly,
Since the cell is showing "Byte[]", it means that the data in that cell is a Byte array. This is how images are typically stored in a database - as a byte array.
The EmbeddableImageRenderer will attempt to convert the Byte array into an image.
But in this case, I'm guessing that your data contains more than just an image. You mentioned a Linked_Record, which I assume includes more than just an image. It probably also includes other information.
If that's the case, then there is no way the grid can extract the image or other information from the Byte array. The grid has no way of knowing how to do that.
It might be possible for you to do it in your code, but that's something you would need to explore with Microsoft.