Image in a Grid
Image in a Grid
I've been reading through some old posts for a solution, but it seems everyone approaches this a little differently.
So I have a table of documents, and I wanted to be a bit "clever" and show the icon associated with the file type. (Word, Excel, PDF, etc). The types are defined in another table that has the file type, extension and icon image associated with it.
So this means each document has a memo field which holds the path to the image type for the "icon" (We made them ourselves, not trying to retrieve them dynamically thought that would be really cool).
So I set up a 3 column Grid: Filename Extension Icon
In column 3 I removed the text box, and put in an image object instead. However, in the Image properties I tried to set Document.Icon (a memo field in the table that has a fully qualified path to the image location, such as T:\MyApp\Configs\FileIcons\Excel2007.PNG
I had expected that as the records were added to the row, the image class would show that .PNG automatically, just like when I point it's picture clause to This.Picture = Document.Icon. While that works at the form level, it doesn't work in a grid... how do I get this to show these by reference to the memo field? Most of the "solutions" I saw were hard coding image types into a field and using dynamiccontrol, but that seems to just pick between differently defined image objects in the column, and I have far to many file type icons for that... Plus I want the addition of new icons to be driven by our "FileType" table, instead of having to code them.
ATS, CDCE, CTIA, CTDC
"Everything should be made as simple as possible, and no simpler."