Omnis Technical Note TNWE0013 September 2006

Displaying Pictures in a Web Datagrid

For Omnis Studio 4 or above
By Andreas Pfeiffer

Deprecated Content
Due to its publication date, this technote contains information which may no longer be accurate or applicable on one or more of the platforms it refers to. Please refer to the index page which may contain updated information.

Sometimes you may want to display pictures in the Web Client in a list. For this purpose you can use the Omnis Datagrid web component. The $columntype of the datagrid column in which you want to display the picture should be set to kDataGridAutoData and the picture should be stored in the Omnis list in CS24 format.

JPEGs and bitmaps can be converted with the Omnis function Pictconfto() before you add the picture field to the list data. You can use the following Omnis method to load JPEGs, convert to CS24 format, and add them to your list:

Do pictconvto('JPEG',iPicture,'CS24') Returns iPicture
Do iList.$add('toolbar',iPicture)
Do pictconvto('BMP',iPicture,'CS24') Returns iPicture
Do iList.$add('orb',iPicture)

The resultant Web datagrid would look something like this:


Search Omnis Developer Resources


Hit enter to search