Grid .:. Detail Form ... Missing Image

Hi All,

I love the tutorial examples, especially the one on docs.dhtmlx.com/doku.php?id=tuto … today:form

I’m just missing an image on the detail form …
The image in attach will clarify my “problem” …


In other words … it would be great if each record in the database would have an “image” field, so this image can be shown / loaded in the detail grid whenever a record-change in the grid is performed…

Can somebody please extend the example on docs.dhtmlx.com/doku.php?id=tuto … today:form ? I guess this would be a help for a lot of devs.

Thanks in advance,

Johnny Driesen
Belgium

There is attached demo without PRO files for all
13.03.15_demo.rar (463 KB)

Thanks for the demo, Darya…

As a remark to all followers of the topic…
Don’t forget to include “dhtmlxDataStore” and “dhtmlxGrid” in this project…

(both folders are not included in the RAR)

Kind regards,

Johnny

I’ve mention it :wink:

Hi Darya,

Your example works perfect !

My application doesn’t (yet) …

I’ve tried to “implement” your code in my application…

My form-layout is loaded via a separate form.xml (see below)
The data is coming from a MySQL database (that’s why I used the “bind” property.
All fields are loading fine … except that my image is (still) not shown on the page…
The image is stored in the field “contact_image” in my database, and it contains a string like “apple.png”

My conclusion so far …
It seems that the syntaxt “format=function …” is not “accepted” in XML …)
But I don’t know how to solve this …

My JS code is nothing more than:
frmContact = tabDetailsContact.attachForm();
frmContact.loadStruct(“xml/form.xml”);

– Content of FORM.XML–
[b][i]<?xml version="1.0" encoding="UTF-8"?>

<item type="template" name="thePict" bind="contact_image" format=function(name, value){ return "" } /> [/i][/b]

Thanks in advance for your help.

Grtz,

Johnny

Please, repeat this question in the ticked you’ve send first and we’ll try to help you.