Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
1265
Link to Document in WinGrid Cell?
posted

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

  • 69832
    Suggested Answer
    Offline posted

    To the UltraGrid, the data in your Linked_Record column is a byte array; there is no way for it to automatically know that it happens to contains image data. You can assign an Infragistics.Win.EmbeddableImageRenderer embeddable editor to the column, and the image will be displayed (assuming the byte array conforms to one the image file formats supported by .NET).

    I am not familiar with all of the MS Access data types, but one of them is OLEObject, which basically serves as a container for OLE data. My guess is that the Access form is using a field of this type to present these "document links" to the user. UltraGrid cannot realistically mimic this behavior since this MS Access functionality most likely comes out of MS Office interoperability. You might be able to get the image to display, but any UI behavior beyond that would have to be coded.